mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-295507d9a692440f/out/
python_array_test.rs

1#![doc = "MAVLink python_array_test dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1001impl HighresImuUpdatedFlags {
1002    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1003}
1004impl Default for HighresImuUpdatedFlags {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1010impl HilActuatorControlsFlags {
1011    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1012}
1013impl Default for HilActuatorControlsFlags {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1019impl HilSensorUpdatedFlags {
1020    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1021}
1022impl Default for HilSensorUpdatedFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1028impl HlFailureFlag {
1029    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1030}
1031impl Default for HlFailureFlag {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1037impl IlluminatorErrorFlags {
1038    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1039}
1040impl Default for IlluminatorErrorFlags {
1041    fn default() -> Self {
1042        Self::DEFAULT
1043    }
1044}
1045#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1047#[cfg_attr(feature = "serde", serde(tag = "type"))]
1048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1049#[repr(u32)]
1050#[doc = "Modes of illuminator"]
1051pub enum IlluminatorMode {
1052    #[doc = "Illuminator mode is not specified/unknown"]
1053    ILLUMINATOR_MODE_UNKNOWN = 0,
1054    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1055    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1056    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1057    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1058}
1059impl IlluminatorMode {
1060    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1061}
1062impl Default for IlluminatorMode {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1069#[cfg_attr(feature = "serde", serde(tag = "type"))]
1070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1071#[repr(u32)]
1072#[doc = "Type of landing target"]
1073pub enum LandingTargetType {
1074    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1075    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1076    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1077    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1078    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1079    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1080    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1081    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1082}
1083impl LandingTargetType {
1084    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1085}
1086impl Default for LandingTargetType {
1087    fn default() -> Self {
1088        Self::DEFAULT
1089    }
1090}
1091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1093#[cfg_attr(feature = "serde", serde(tag = "type"))]
1094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1095#[repr(u32)]
1096pub enum MagCalStatus {
1097    MAG_CAL_NOT_STARTED = 0,
1098    MAG_CAL_WAITING_TO_START = 1,
1099    MAG_CAL_RUNNING_STEP_ONE = 2,
1100    MAG_CAL_RUNNING_STEP_TWO = 3,
1101    MAG_CAL_SUCCESS = 4,
1102    MAG_CAL_FAILED = 5,
1103    MAG_CAL_BAD_ORIENTATION = 6,
1104    MAG_CAL_BAD_RADIUS = 7,
1105}
1106impl MagCalStatus {
1107    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1108}
1109impl Default for MagCalStatus {
1110    fn default() -> Self {
1111        Self::DEFAULT
1112    }
1113}
1114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1116#[cfg_attr(feature = "serde", serde(tag = "type"))]
1117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1118#[repr(u32)]
1119pub enum MavArmAuthDeniedReason {
1120    #[doc = "Not a specific reason"]
1121    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1122    #[doc = "Authorizer will send the error as string to GCS"]
1123    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1124    #[doc = "At least one waypoint have a invalid value"]
1125    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1126    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1127    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1128    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1129    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1130    #[doc = "Weather is not good to fly"]
1131    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1132}
1133impl MavArmAuthDeniedReason {
1134    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1135}
1136impl Default for MavArmAuthDeniedReason {
1137    fn default() -> Self {
1138        Self::DEFAULT
1139    }
1140}
1141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1143#[cfg_attr(feature = "serde", serde(tag = "type"))]
1144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1145#[repr(u32)]
1146#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1147pub enum MavAutopilot {
1148    #[doc = "Generic autopilot, full support for everything"]
1149    MAV_AUTOPILOT_GENERIC = 0,
1150    #[doc = "Reserved for future use."]
1151    MAV_AUTOPILOT_RESERVED = 1,
1152    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1153    MAV_AUTOPILOT_SLUGS = 2,
1154    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1155    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1156    #[doc = "OpenPilot, <http://openpilot.org>"]
1157    MAV_AUTOPILOT_OPENPILOT = 4,
1158    #[doc = "Generic autopilot only supporting simple waypoints"]
1159    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1160    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1161    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1162    #[doc = "Generic autopilot supporting the full mission command set"]
1163    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1164    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1165    MAV_AUTOPILOT_INVALID = 8,
1166    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1167    MAV_AUTOPILOT_PPZ = 9,
1168    #[doc = "UAV Dev Board"]
1169    MAV_AUTOPILOT_UDB = 10,
1170    #[doc = "FlexiPilot"]
1171    MAV_AUTOPILOT_FP = 11,
1172    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1173    MAV_AUTOPILOT_PX4 = 12,
1174    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1175    MAV_AUTOPILOT_SMACCMPILOT = 13,
1176    #[doc = "AutoQuad -- <http://autoquad.org>"]
1177    MAV_AUTOPILOT_AUTOQUAD = 14,
1178    #[doc = "Armazila -- <http://armazila.com>"]
1179    MAV_AUTOPILOT_ARMAZILA = 15,
1180    #[doc = "Aerob -- <http://aerob.ru>"]
1181    MAV_AUTOPILOT_AEROB = 16,
1182    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1183    MAV_AUTOPILOT_ASLUAV = 17,
1184    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1185    MAV_AUTOPILOT_SMARTAP = 18,
1186    #[doc = "AirRails - <http://uaventure.com>"]
1187    MAV_AUTOPILOT_AIRRAILS = 19,
1188    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1189    MAV_AUTOPILOT_REFLEX = 20,
1190}
1191impl MavAutopilot {
1192    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1193}
1194impl Default for MavAutopilot {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1201#[cfg_attr(feature = "serde", serde(tag = "type"))]
1202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1203#[repr(u32)]
1204#[doc = "Enumeration for battery charge states."]
1205pub enum MavBatteryChargeState {
1206    #[doc = "Low battery state is not provided"]
1207    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1208    #[doc = "Battery is not in low state. Normal operation."]
1209    MAV_BATTERY_CHARGE_STATE_OK = 1,
1210    #[doc = "Battery state is low, warn and monitor close."]
1211    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1212    #[doc = "Battery state is critical, return or abort immediately."]
1213    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1214    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1215    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1216    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1217    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1218    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1219    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1220    #[doc = "Battery is charging."]
1221    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1222}
1223impl MavBatteryChargeState {
1224    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1225}
1226impl Default for MavBatteryChargeState {
1227    fn default() -> Self {
1228        Self::DEFAULT
1229    }
1230}
1231bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1232impl MavBatteryFault {
1233    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1234}
1235impl Default for MavBatteryFault {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Enumeration of battery functions"]
1246pub enum MavBatteryFunction {
1247    #[doc = "Battery function is unknown"]
1248    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1249    #[doc = "Battery supports all flight systems"]
1250    MAV_BATTERY_FUNCTION_ALL = 1,
1251    #[doc = "Battery for the propulsion system"]
1252    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1253    #[doc = "Avionics battery"]
1254    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1255    #[doc = "Payload battery"]
1256    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1257}
1258impl MavBatteryFunction {
1259    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1260}
1261impl Default for MavBatteryFunction {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1268#[cfg_attr(feature = "serde", serde(tag = "type"))]
1269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1270#[repr(u32)]
1271#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1272pub enum MavBatteryMode {
1273    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1274    MAV_BATTERY_MODE_UNKNOWN = 0,
1275    #[doc = "Battery is auto discharging (towards storage level)."]
1276    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1277    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1278    MAV_BATTERY_MODE_HOT_SWAP = 2,
1279}
1280impl MavBatteryMode {
1281    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1282}
1283impl Default for MavBatteryMode {
1284    fn default() -> Self {
1285        Self::DEFAULT
1286    }
1287}
1288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1290#[cfg_attr(feature = "serde", serde(tag = "type"))]
1291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1292#[repr(u32)]
1293#[doc = "Enumeration of battery types"]
1294pub enum MavBatteryType {
1295    #[doc = "Not specified."]
1296    MAV_BATTERY_TYPE_UNKNOWN = 0,
1297    #[doc = "Lithium polymer battery"]
1298    MAV_BATTERY_TYPE_LIPO = 1,
1299    #[doc = "Lithium-iron-phosphate battery"]
1300    MAV_BATTERY_TYPE_LIFE = 2,
1301    #[doc = "Lithium-ION battery"]
1302    MAV_BATTERY_TYPE_LION = 3,
1303    #[doc = "Nickel metal hydride battery"]
1304    MAV_BATTERY_TYPE_NIMH = 4,
1305}
1306impl MavBatteryType {
1307    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1308}
1309impl Default for MavBatteryType {
1310    fn default() -> Self {
1311        Self::DEFAULT
1312    }
1313}
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1320pub enum MavCmd {
1321    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1322    MAV_CMD_NAV_WAYPOINT = 16,
1323    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1324    MAV_CMD_NAV_LOITER_UNLIM = 17,
1325    #[doc = "Loiter around this waypoint for X turns"]
1326    MAV_CMD_NAV_LOITER_TURNS = 18,
1327    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1328    MAV_CMD_NAV_LOITER_TIME = 19,
1329    #[doc = "Return to launch location"]
1330    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1331    #[doc = "Land at location."]
1332    MAV_CMD_NAV_LAND = 21,
1333    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1334    MAV_CMD_NAV_TAKEOFF = 22,
1335    #[doc = "Land at local position (local frame only)"]
1336    MAV_CMD_NAV_LAND_LOCAL = 23,
1337    #[doc = "Takeoff from local position (local frame only)"]
1338    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1339    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1340    MAV_CMD_NAV_FOLLOW = 25,
1341    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1342    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1343    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1344    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1345    #[doc = "Begin following a target"]
1346    MAV_CMD_DO_FOLLOW = 32,
1347    #[doc = "Reposition the MAV after a follow target command has been sent"]
1348    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1349    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1350    MAV_CMD_DO_ORBIT = 34,
1351    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1352    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1353    MAV_CMD_NAV_ROI = 80,
1354    #[doc = "Control autonomous path planning on the MAV."]
1355    MAV_CMD_NAV_PATHPLANNING = 81,
1356    #[doc = "Navigate to waypoint using a spline path."]
1357    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1358    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1359    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1360    #[doc = "Land using VTOL mode"]
1361    MAV_CMD_NAV_VTOL_LAND = 85,
1362    #[doc = "hand control over to an external controller"]
1363    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1364    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1365    MAV_CMD_NAV_DELAY = 93,
1366    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1367    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1368    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1369    MAV_CMD_NAV_LAST = 95,
1370    #[doc = "Delay mission state machine."]
1371    MAV_CMD_CONDITION_DELAY = 112,
1372    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1373    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1374    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1375    MAV_CMD_CONDITION_DISTANCE = 114,
1376    #[doc = "Reach a certain target angle."]
1377    MAV_CMD_CONDITION_YAW = 115,
1378    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1379    MAV_CMD_CONDITION_LAST = 159,
1380    #[doc = "Set system mode."]
1381    MAV_CMD_DO_SET_MODE = 176,
1382    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1383    MAV_CMD_DO_JUMP = 177,
1384    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1385    MAV_CMD_DO_CHANGE_SPEED = 178,
1386    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1387    MAV_CMD_DO_SET_HOME = 179,
1388    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1389    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1390    MAV_CMD_DO_SET_PARAMETER = 180,
1391    #[doc = "Set a relay to a condition."]
1392    MAV_CMD_DO_SET_RELAY = 181,
1393    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1394    MAV_CMD_DO_REPEAT_RELAY = 182,
1395    #[doc = "Set a servo to a desired PWM value."]
1396    MAV_CMD_DO_SET_SERVO = 183,
1397    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1398    MAV_CMD_DO_REPEAT_SERVO = 184,
1399    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1400    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1401    #[doc = "Change altitude set point."]
1402    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1403    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1404    MAV_CMD_DO_SET_ACTUATOR = 187,
1405    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1406    MAV_CMD_DO_RETURN_PATH_START = 188,
1407    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1408    MAV_CMD_DO_LAND_START = 189,
1409    #[doc = "Mission command to perform a landing from a rally point."]
1410    MAV_CMD_DO_RALLY_LAND = 190,
1411    #[doc = "Mission command to safely abort an autonomous landing."]
1412    MAV_CMD_DO_GO_AROUND = 191,
1413    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1414    MAV_CMD_DO_REPOSITION = 192,
1415    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1416    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1417    #[doc = "Set moving direction to forward or reverse."]
1418    MAV_CMD_DO_SET_REVERSE = 194,
1419    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1420    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1421    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1422    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1423    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1424    MAV_CMD_DO_SET_ROI_NONE = 197,
1425    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1426    MAV_CMD_DO_SET_ROI_SYSID = 198,
1427    #[doc = "Control onboard camera system."]
1428    MAV_CMD_DO_CONTROL_VIDEO = 200,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_DO_SET_ROI = 201,
1432    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1433    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1434    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1435    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1436    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1437    #[doc = "Mission command to configure a camera or antenna mount"]
1438    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1439    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1440    #[doc = "Mission command to control a camera or antenna mount"]
1441    MAV_CMD_DO_MOUNT_CONTROL = 205,
1442    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1443    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1444    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1445    MAV_CMD_DO_FENCE_ENABLE = 207,
1446    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1447    MAV_CMD_DO_PARACHUTE = 208,
1448    #[doc = "Command to perform motor test."]
1449    MAV_CMD_DO_MOTOR_TEST = 209,
1450    #[doc = "Change to/from inverted flight."]
1451    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1452    #[doc = "Mission command to operate a gripper."]
1453    MAV_CMD_DO_GRIPPER = 211,
1454    #[doc = "Enable/disable autotune."]
1455    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1456    #[doc = "Sets a desired vehicle turn angle and speed change."]
1457    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1458    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1459    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1460    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1461    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1462    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1463    #[doc = "set id of master controller"]
1464    MAV_CMD_DO_GUIDED_MASTER = 221,
1465    #[doc = "Set limits for external control"]
1466    MAV_CMD_DO_GUIDED_LIMITS = 222,
1467    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1468    MAV_CMD_DO_ENGINE_CONTROL = 223,
1469    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1470    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1471    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1472    MAV_CMD_DO_LAST = 240,
1473    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1474    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1475    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1476    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1477    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1478    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1479    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1480    MAV_CMD_PREFLIGHT_STORAGE = 245,
1481    #[doc = "Request the reboot or shutdown of system components."]
1482    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1483    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1484    MAV_CMD_OVERRIDE_GOTO = 252,
1485    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1486    MAV_CMD_OBLIQUE_SURVEY = 260,
1487    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1488    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1489    #[doc = "start running a mission"]
1490    MAV_CMD_MISSION_START = 300,
1491    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1492    MAV_CMD_ACTUATOR_TEST = 310,
1493    #[doc = "Actuator configuration command."]
1494    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1495    #[doc = "Arms / Disarms a component"]
1496    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1497    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1498    MAV_CMD_RUN_PREARM_CHECKS = 401,
1499    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1500    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1501    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1502    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1503    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1504    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1505    MAV_CMD_GET_HOME_POSITION = 410,
1506    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1507    MAV_CMD_INJECT_FAILURE = 420,
1508    #[doc = "Starts receiver pairing."]
1509    MAV_CMD_START_RX_PAIR = 500,
1510    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1511    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1512    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1513    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1514    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1515    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1516    MAV_CMD_REQUEST_MESSAGE = 512,
1517    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1518    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1519    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1520    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1521    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1522    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1523    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1524    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1525    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1526    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1527    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1528    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1529    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1530    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1531    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1532    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1533    MAV_CMD_STORAGE_FORMAT = 526,
1534    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1535    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1536    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1537    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1538    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1539    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1540    #[doc = "Reset all camera settings to Factory Default"]
1541    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1542    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1543    MAV_CMD_SET_CAMERA_MODE = 530,
1544    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1545    MAV_CMD_SET_CAMERA_ZOOM = 531,
1546    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1547    MAV_CMD_SET_CAMERA_FOCUS = 532,
1548    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1549    MAV_CMD_SET_STORAGE_USAGE = 533,
1550    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1551    MAV_CMD_SET_CAMERA_SOURCE = 534,
1552    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1553    MAV_CMD_JUMP_TAG = 600,
1554    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1555    MAV_CMD_DO_JUMP_TAG = 601,
1556    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1557    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1558    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1559    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1560    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1561    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1562    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1563    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1566    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1567    #[doc = "Enable or disable on-board camera triggering system."]
1568    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1569    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1570    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1571    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1572    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1573    #[doc = "Stops ongoing tracking."]
1574    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1575    #[doc = "Starts video capture (recording)."]
1576    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1577    #[doc = "Stop the current video capture (recording)."]
1578    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1579    #[doc = "Start video streaming"]
1580    MAV_CMD_VIDEO_START_STREAMING = 2502,
1581    #[doc = "Stop the given video stream"]
1582    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1583    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1584    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1585    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1587    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1588    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1589    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1590    MAV_CMD_LOGGING_START = 2510,
1591    #[doc = "Request to stop streaming log data over MAVLink"]
1592    MAV_CMD_LOGGING_STOP = 2511,
1593    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1594    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1595    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1596    #[doc = "Create a panorama at the current position"]
1597    MAV_CMD_PANORAMA_CREATE = 2800,
1598    #[doc = "Request VTOL transition"]
1599    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1600    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1601    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1602    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1603    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1604    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1605    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1606    #[doc = "Delay mission state machine until gate has been reached."]
1607    MAV_CMD_CONDITION_GATE = 4501,
1608    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1609    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1610    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1611    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1612    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1613    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1614    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1615    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1616    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1617    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1618    #[doc = "Rally point. You can have multiple rally points defined."]
1619    MAV_CMD_NAV_RALLY_POINT = 5100,
1620    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1621    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1622    #[doc = "Change state of safety switch."]
1623    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1624    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1625    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1626    #[deprecated = "  (Deprecated since 2021-06)"]
1627    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1628    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1629    #[deprecated = "  (Deprecated since 2021-06)"]
1630    #[doc = "Control the payload deployment."]
1631    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1632    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1633    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1634    #[doc = "Command to operate winch."]
1635    MAV_CMD_DO_WINCH = 42600,
1636    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1637    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1638    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1639    MAV_CMD_WAYPOINT_USER_1 = 31000,
1640    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1641    MAV_CMD_WAYPOINT_USER_2 = 31001,
1642    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1643    MAV_CMD_WAYPOINT_USER_3 = 31002,
1644    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1645    MAV_CMD_WAYPOINT_USER_4 = 31003,
1646    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1647    MAV_CMD_WAYPOINT_USER_5 = 31004,
1648    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1649    MAV_CMD_SPATIAL_USER_1 = 31005,
1650    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1651    MAV_CMD_SPATIAL_USER_2 = 31006,
1652    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1653    MAV_CMD_SPATIAL_USER_3 = 31007,
1654    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1655    MAV_CMD_SPATIAL_USER_4 = 31008,
1656    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1657    MAV_CMD_SPATIAL_USER_5 = 31009,
1658    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1659    MAV_CMD_USER_1 = 31010,
1660    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1661    MAV_CMD_USER_2 = 31011,
1662    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1663    MAV_CMD_USER_3 = 31012,
1664    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1665    MAV_CMD_USER_4 = 31013,
1666    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1667    MAV_CMD_USER_5 = 31014,
1668    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1669    MAV_CMD_CAN_FORWARD = 32000,
1670}
1671impl MavCmd {
1672    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1673}
1674impl Default for MavCmd {
1675    fn default() -> Self {
1676        Self::DEFAULT
1677    }
1678}
1679#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1681#[cfg_attr(feature = "serde", serde(tag = "type"))]
1682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1683#[repr(u32)]
1684#[doc = "Possible actions an aircraft can take to avoid a collision."]
1685pub enum MavCollisionAction {
1686    #[doc = "Ignore any potential collisions"]
1687    MAV_COLLISION_ACTION_NONE = 0,
1688    #[doc = "Report potential collision"]
1689    MAV_COLLISION_ACTION_REPORT = 1,
1690    #[doc = "Ascend or Descend to avoid threat"]
1691    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1692    #[doc = "Move horizontally to avoid threat"]
1693    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1694    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1695    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1696    #[doc = "Aircraft to fly directly back to its launch point"]
1697    MAV_COLLISION_ACTION_RTL = 5,
1698    #[doc = "Aircraft to stop in place"]
1699    MAV_COLLISION_ACTION_HOVER = 6,
1700}
1701impl MavCollisionAction {
1702    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1703}
1704impl Default for MavCollisionAction {
1705    fn default() -> Self {
1706        Self::DEFAULT
1707    }
1708}
1709#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1711#[cfg_attr(feature = "serde", serde(tag = "type"))]
1712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1713#[repr(u32)]
1714#[doc = "Source of information about this collision."]
1715pub enum MavCollisionSrc {
1716    #[doc = "ID field references ADSB_VEHICLE packets"]
1717    MAV_COLLISION_SRC_ADSB = 0,
1718    #[doc = "ID field references MAVLink SRC ID"]
1719    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1720}
1721impl MavCollisionSrc {
1722    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1723}
1724impl Default for MavCollisionSrc {
1725    fn default() -> Self {
1726        Self::DEFAULT
1727    }
1728}
1729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1731#[cfg_attr(feature = "serde", serde(tag = "type"))]
1732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1733#[repr(u32)]
1734#[doc = "Aircraft-rated danger from this threat."]
1735pub enum MavCollisionThreatLevel {
1736    #[doc = "Not a threat"]
1737    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1738    #[doc = "Craft is mildly concerned about this threat"]
1739    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1740    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1741    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1742}
1743impl MavCollisionThreatLevel {
1744    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1745}
1746impl Default for MavCollisionThreatLevel {
1747    fn default() -> Self {
1748        Self::DEFAULT
1749    }
1750}
1751#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1753#[cfg_attr(feature = "serde", serde(tag = "type"))]
1754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1755#[repr(u32)]
1756#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1757pub enum MavComponent {
1758    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1759    MAV_COMP_ID_ALL = 0,
1760    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1761    MAV_COMP_ID_AUTOPILOT1 = 1,
1762    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1763    MAV_COMP_ID_USER1 = 25,
1764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1765    MAV_COMP_ID_USER2 = 26,
1766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1767    MAV_COMP_ID_USER3 = 27,
1768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1769    MAV_COMP_ID_USER4 = 28,
1770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1771    MAV_COMP_ID_USER5 = 29,
1772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1773    MAV_COMP_ID_USER6 = 30,
1774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1775    MAV_COMP_ID_USER7 = 31,
1776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1777    MAV_COMP_ID_USER8 = 32,
1778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1779    MAV_COMP_ID_USER9 = 33,
1780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1781    MAV_COMP_ID_USER10 = 34,
1782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1783    MAV_COMP_ID_USER11 = 35,
1784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1785    MAV_COMP_ID_USER12 = 36,
1786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1787    MAV_COMP_ID_USER13 = 37,
1788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1789    MAV_COMP_ID_USER14 = 38,
1790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1791    MAV_COMP_ID_USER15 = 39,
1792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1793    MAV_COMP_ID_USER16 = 40,
1794    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1795    MAV_COMP_ID_USER17 = 41,
1796    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1797    MAV_COMP_ID_USER18 = 42,
1798    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1799    MAV_COMP_ID_USER19 = 43,
1800    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1801    MAV_COMP_ID_USER20 = 44,
1802    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1803    MAV_COMP_ID_USER21 = 45,
1804    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1805    MAV_COMP_ID_USER22 = 46,
1806    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1807    MAV_COMP_ID_USER23 = 47,
1808    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1809    MAV_COMP_ID_USER24 = 48,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER25 = 49,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER26 = 50,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER27 = 51,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER28 = 52,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER29 = 53,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER30 = 54,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER31 = 55,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER32 = 56,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER33 = 57,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER34 = 58,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER35 = 59,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER36 = 60,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER37 = 61,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER38 = 62,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER39 = 63,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER40 = 64,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER41 = 65,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER42 = 66,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER43 = 67,
1848    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1849    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER45 = 69,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER46 = 70,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER47 = 71,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER48 = 72,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER49 = 73,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER50 = 74,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER51 = 75,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER52 = 76,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER53 = 77,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER54 = 78,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER55 = 79,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER56 = 80,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER57 = 81,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER58 = 82,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER59 = 83,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER60 = 84,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER61 = 85,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER62 = 86,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER63 = 87,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER64 = 88,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER65 = 89,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER66 = 90,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER67 = 91,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER68 = 92,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER69 = 93,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER70 = 94,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER71 = 95,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER72 = 96,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER73 = 97,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER74 = 98,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER75 = 99,
1912    #[doc = "Camera #1."]
1913    MAV_COMP_ID_CAMERA = 100,
1914    #[doc = "Camera #2."]
1915    MAV_COMP_ID_CAMERA2 = 101,
1916    #[doc = "Camera #3."]
1917    MAV_COMP_ID_CAMERA3 = 102,
1918    #[doc = "Camera #4."]
1919    MAV_COMP_ID_CAMERA4 = 103,
1920    #[doc = "Camera #5."]
1921    MAV_COMP_ID_CAMERA5 = 104,
1922    #[doc = "Camera #6."]
1923    MAV_COMP_ID_CAMERA6 = 105,
1924    #[doc = "Servo #1."]
1925    MAV_COMP_ID_SERVO1 = 140,
1926    #[doc = "Servo #2."]
1927    MAV_COMP_ID_SERVO2 = 141,
1928    #[doc = "Servo #3."]
1929    MAV_COMP_ID_SERVO3 = 142,
1930    #[doc = "Servo #4."]
1931    MAV_COMP_ID_SERVO4 = 143,
1932    #[doc = "Servo #5."]
1933    MAV_COMP_ID_SERVO5 = 144,
1934    #[doc = "Servo #6."]
1935    MAV_COMP_ID_SERVO6 = 145,
1936    #[doc = "Servo #7."]
1937    MAV_COMP_ID_SERVO7 = 146,
1938    #[doc = "Servo #8."]
1939    MAV_COMP_ID_SERVO8 = 147,
1940    #[doc = "Servo #9."]
1941    MAV_COMP_ID_SERVO9 = 148,
1942    #[doc = "Servo #10."]
1943    MAV_COMP_ID_SERVO10 = 149,
1944    #[doc = "Servo #11."]
1945    MAV_COMP_ID_SERVO11 = 150,
1946    #[doc = "Servo #12."]
1947    MAV_COMP_ID_SERVO12 = 151,
1948    #[doc = "Servo #13."]
1949    MAV_COMP_ID_SERVO13 = 152,
1950    #[doc = "Servo #14."]
1951    MAV_COMP_ID_SERVO14 = 153,
1952    #[doc = "Gimbal #1."]
1953    MAV_COMP_ID_GIMBAL = 154,
1954    #[doc = "Logging component."]
1955    MAV_COMP_ID_LOG = 155,
1956    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1957    MAV_COMP_ID_ADSB = 156,
1958    #[doc = "On Screen Display (OSD) devices for video links."]
1959    MAV_COMP_ID_OSD = 157,
1960    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1961    MAV_COMP_ID_PERIPHERAL = 158,
1962    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1963    #[doc = "Gimbal ID for QX1."]
1964    MAV_COMP_ID_QX1_GIMBAL = 159,
1965    #[doc = "FLARM collision alert component."]
1966    MAV_COMP_ID_FLARM = 160,
1967    #[doc = "Parachute component."]
1968    MAV_COMP_ID_PARACHUTE = 161,
1969    #[doc = "Winch component."]
1970    MAV_COMP_ID_WINCH = 169,
1971    #[doc = "Gimbal #2."]
1972    MAV_COMP_ID_GIMBAL2 = 171,
1973    #[doc = "Gimbal #3."]
1974    MAV_COMP_ID_GIMBAL3 = 172,
1975    #[doc = "Gimbal #4"]
1976    MAV_COMP_ID_GIMBAL4 = 173,
1977    #[doc = "Gimbal #5."]
1978    MAV_COMP_ID_GIMBAL5 = 174,
1979    #[doc = "Gimbal #6."]
1980    MAV_COMP_ID_GIMBAL6 = 175,
1981    #[doc = "Battery #1."]
1982    MAV_COMP_ID_BATTERY = 180,
1983    #[doc = "Battery #2."]
1984    MAV_COMP_ID_BATTERY2 = 181,
1985    #[doc = "CAN over MAVLink client."]
1986    MAV_COMP_ID_MAVCAN = 189,
1987    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1988    MAV_COMP_ID_MISSIONPLANNER = 190,
1989    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1990    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1991    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1992    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1993    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1994    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1995    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1996    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1997    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1998    MAV_COMP_ID_PATHPLANNER = 195,
1999    #[doc = "Component that plans a collision free path between two points."]
2000    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2001    #[doc = "Component that provides position estimates using VIO techniques."]
2002    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2003    #[doc = "Component that manages pairing of vehicle and GCS."]
2004    MAV_COMP_ID_PAIRING_MANAGER = 198,
2005    #[doc = "Inertial Measurement Unit (IMU) #1."]
2006    MAV_COMP_ID_IMU = 200,
2007    #[doc = "Inertial Measurement Unit (IMU) #2."]
2008    MAV_COMP_ID_IMU_2 = 201,
2009    #[doc = "Inertial Measurement Unit (IMU) #3."]
2010    MAV_COMP_ID_IMU_3 = 202,
2011    #[doc = "GPS #1."]
2012    MAV_COMP_ID_GPS = 220,
2013    #[doc = "GPS #2."]
2014    MAV_COMP_ID_GPS2 = 221,
2015    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2016    MAV_COMP_ID_ODID_TXRX_1 = 236,
2017    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2018    MAV_COMP_ID_ODID_TXRX_2 = 237,
2019    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2020    MAV_COMP_ID_ODID_TXRX_3 = 238,
2021    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2022    MAV_COMP_ID_UDP_BRIDGE = 240,
2023    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2024    MAV_COMP_ID_UART_BRIDGE = 241,
2025    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2026    MAV_COMP_ID_TUNNEL_NODE = 242,
2027    #[doc = "Illuminator"]
2028    MAV_COMP_ID_ILLUMINATOR = 243,
2029    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2030    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2031    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2032}
2033impl MavComponent {
2034    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2035}
2036impl Default for MavComponent {
2037    fn default() -> Self {
2038        Self::DEFAULT
2039    }
2040}
2041#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2043#[cfg_attr(feature = "serde", serde(tag = "type"))]
2044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2045#[repr(u32)]
2046#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2047#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2048pub enum MavDataStream {
2049    #[doc = "Enable all data streams"]
2050    MAV_DATA_STREAM_ALL = 0,
2051    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2052    MAV_DATA_STREAM_RAW_SENSORS = 1,
2053    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2054    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2055    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2056    MAV_DATA_STREAM_RC_CHANNELS = 3,
2057    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2058    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2059    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2060    MAV_DATA_STREAM_POSITION = 6,
2061    #[doc = "Dependent on the autopilot"]
2062    MAV_DATA_STREAM_EXTRA1 = 10,
2063    #[doc = "Dependent on the autopilot"]
2064    MAV_DATA_STREAM_EXTRA2 = 11,
2065    #[doc = "Dependent on the autopilot"]
2066    MAV_DATA_STREAM_EXTRA3 = 12,
2067}
2068impl MavDataStream {
2069    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2070}
2071impl Default for MavDataStream {
2072    fn default() -> Self {
2073        Self::DEFAULT
2074    }
2075}
2076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2078#[cfg_attr(feature = "serde", serde(tag = "type"))]
2079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2080#[repr(u32)]
2081#[doc = "Enumeration of distance sensor types"]
2082pub enum MavDistanceSensor {
2083    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2084    MAV_DISTANCE_SENSOR_LASER = 0,
2085    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2086    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2087    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2088    MAV_DISTANCE_SENSOR_INFRARED = 2,
2089    #[doc = "Radar type, e.g. uLanding units"]
2090    MAV_DISTANCE_SENSOR_RADAR = 3,
2091    #[doc = "Broken or unknown type, e.g. analog units"]
2092    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2093}
2094impl MavDistanceSensor {
2095    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2096}
2097impl Default for MavDistanceSensor {
2098    fn default() -> Self {
2099        Self::DEFAULT
2100    }
2101}
2102#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2104#[cfg_attr(feature = "serde", serde(tag = "type"))]
2105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2106#[repr(u32)]
2107#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2108pub enum MavDoRepositionFlags {
2109    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2110    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2111}
2112impl MavDoRepositionFlags {
2113    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2114}
2115impl Default for MavDoRepositionFlags {
2116    fn default() -> Self {
2117        Self::DEFAULT
2118    }
2119}
2120#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2122#[cfg_attr(feature = "serde", serde(tag = "type"))]
2123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2124#[repr(u32)]
2125#[doc = "Enumeration of estimator types"]
2126pub enum MavEstimatorType {
2127    #[doc = "Unknown type of the estimator."]
2128    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2129    #[doc = "This is a naive estimator without any real covariance feedback."]
2130    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2131    #[doc = "Computer vision based estimate. Might be up to scale."]
2132    MAV_ESTIMATOR_TYPE_VISION = 2,
2133    #[doc = "Visual-inertial estimate."]
2134    MAV_ESTIMATOR_TYPE_VIO = 3,
2135    #[doc = "Plain GPS estimate."]
2136    MAV_ESTIMATOR_TYPE_GPS = 4,
2137    #[doc = "Estimator integrating GPS and inertial sensing."]
2138    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2139    #[doc = "Estimate from external motion capturing system."]
2140    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2141    #[doc = "Estimator based on lidar sensor input."]
2142    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2143    #[doc = "Estimator on autopilot."]
2144    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2145}
2146impl MavEstimatorType {
2147    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2148}
2149impl Default for MavEstimatorType {
2150    fn default() -> Self {
2151        Self::DEFAULT
2152    }
2153}
2154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2156#[cfg_attr(feature = "serde", serde(tag = "type"))]
2157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2158#[repr(u32)]
2159#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2160pub enum MavEventCurrentSequenceFlags {
2161    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2162    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2163}
2164impl MavEventCurrentSequenceFlags {
2165    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2166}
2167impl Default for MavEventCurrentSequenceFlags {
2168    fn default() -> Self {
2169        Self::DEFAULT
2170    }
2171}
2172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2174#[cfg_attr(feature = "serde", serde(tag = "type"))]
2175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2176#[repr(u32)]
2177#[doc = "Reason for an event error response."]
2178pub enum MavEventErrorReason {
2179    #[doc = "The requested event is not available (anymore)."]
2180    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2181}
2182impl MavEventErrorReason {
2183    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2184}
2185impl Default for MavEventErrorReason {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2192#[cfg_attr(feature = "serde", serde(tag = "type"))]
2193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2194#[repr(u32)]
2195#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2196pub enum MavFrame {
2197    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2198    MAV_FRAME_GLOBAL = 0,
2199    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2200    MAV_FRAME_LOCAL_NED = 1,
2201    #[doc = "NOT a coordinate frame, indicates a mission command."]
2202    MAV_FRAME_MISSION = 2,
2203    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2204    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2205    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2206    MAV_FRAME_LOCAL_ENU = 4,
2207    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2208    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2209    MAV_FRAME_GLOBAL_INT = 5,
2210    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2211    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2212    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2213    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2214    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2215    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2216    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2217    MAV_FRAME_BODY_NED = 8,
2218    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2219    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2220    MAV_FRAME_BODY_OFFSET_NED = 9,
2221    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2222    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2223    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2224    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2225    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2226    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2227    MAV_FRAME_BODY_FRD = 12,
2228    #[deprecated = "  (Deprecated since 2019-04)"]
2229    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2230    MAV_FRAME_RESERVED_13 = 13,
2231    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2232    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2233    MAV_FRAME_RESERVED_14 = 14,
2234    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2235    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2236    MAV_FRAME_RESERVED_15 = 15,
2237    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2238    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2239    MAV_FRAME_RESERVED_16 = 16,
2240    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2241    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2242    MAV_FRAME_RESERVED_17 = 17,
2243    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2244    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2245    MAV_FRAME_RESERVED_18 = 18,
2246    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2247    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2248    MAV_FRAME_RESERVED_19 = 19,
2249    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2250    MAV_FRAME_LOCAL_FRD = 20,
2251    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2252    MAV_FRAME_LOCAL_FLU = 21,
2253}
2254impl MavFrame {
2255    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2256}
2257impl Default for MavFrame {
2258    fn default() -> Self {
2259        Self::DEFAULT
2260    }
2261}
2262#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2264#[cfg_attr(feature = "serde", serde(tag = "type"))]
2265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2266#[repr(u32)]
2267#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2268pub enum MavFtpErr {
2269    #[doc = "None: No error"]
2270    MAV_FTP_ERR_NONE = 0,
2271    #[doc = "Fail: Unknown failure"]
2272    MAV_FTP_ERR_FAIL = 1,
2273    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2274    MAV_FTP_ERR_FAILERRNO = 2,
2275    #[doc = "InvalidDataSize: Payload size is invalid"]
2276    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2277    #[doc = "InvalidSession: Session is not currently open"]
2278    MAV_FTP_ERR_INVALIDSESSION = 4,
2279    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2280    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2281    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2282    MAV_FTP_ERR_EOF = 6,
2283    #[doc = "UnknownCommand: Unknown command / opcode"]
2284    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2285    #[doc = "FileExists: File/directory already exists"]
2286    MAV_FTP_ERR_FILEEXISTS = 8,
2287    #[doc = "FileProtected: File/directory is write protected"]
2288    MAV_FTP_ERR_FILEPROTECTED = 9,
2289    #[doc = "FileNotFound: File/directory not found"]
2290    MAV_FTP_ERR_FILENOTFOUND = 10,
2291}
2292impl MavFtpErr {
2293    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2294}
2295impl Default for MavFtpErr {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "serde", serde(tag = "type"))]
2303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2304#[repr(u32)]
2305#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2306pub enum MavFtpOpcode {
2307    #[doc = "None. Ignored, always ACKed"]
2308    MAV_FTP_OPCODE_NONE = 0,
2309    #[doc = "TerminateSession: Terminates open Read session"]
2310    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2311    #[doc = "ResetSessions: Terminates all open read sessions"]
2312    MAV_FTP_OPCODE_RESETSESSION = 2,
2313    #[doc = "ListDirectory. List files and directories in path from offset"]
2314    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2315    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2316    MAV_FTP_OPCODE_OPENFILERO = 4,
2317    #[doc = "ReadFile: Reads size bytes from offset in session"]
2318    MAV_FTP_OPCODE_READFILE = 5,
2319    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2320    MAV_FTP_OPCODE_CREATEFILE = 6,
2321    #[doc = "WriteFile: Writes size bytes to offset in session"]
2322    MAV_FTP_OPCODE_WRITEFILE = 7,
2323    #[doc = "RemoveFile: Remove file at path"]
2324    MAV_FTP_OPCODE_REMOVEFILE = 8,
2325    #[doc = "CreateDirectory: Creates directory at path"]
2326    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2327    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2328    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2329    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2330    MAV_FTP_OPCODE_OPENFILEWO = 11,
2331    #[doc = "TruncateFile: Truncate file at path to offset length"]
2332    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2333    #[doc = "Rename: Rename path1 to path2"]
2334    MAV_FTP_OPCODE_RENAME = 13,
2335    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2336    MAV_FTP_OPCODE_CALCFILECRC = 14,
2337    #[doc = "BurstReadFile: Burst download session file"]
2338    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2339    #[doc = "ACK: ACK response"]
2340    MAV_FTP_OPCODE_ACK = 128,
2341    #[doc = "NAK: NAK response"]
2342    MAV_FTP_OPCODE_NAK = 129,
2343}
2344impl MavFtpOpcode {
2345    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2346}
2347impl Default for MavFtpOpcode {
2348    fn default() -> Self {
2349        Self::DEFAULT
2350    }
2351}
2352#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2354#[cfg_attr(feature = "serde", serde(tag = "type"))]
2355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2356#[repr(u32)]
2357#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2358pub enum MavFuelType {
2359    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2360    MAV_FUEL_TYPE_UNKNOWN = 0,
2361    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2362    MAV_FUEL_TYPE_LIQUID = 1,
2363    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2364    MAV_FUEL_TYPE_GAS = 2,
2365}
2366impl MavFuelType {
2367    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2368}
2369impl Default for MavFuelType {
2370    fn default() -> Self {
2371        Self::DEFAULT
2372    }
2373}
2374bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2375impl MavGeneratorStatusFlag {
2376    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2377}
2378impl Default for MavGeneratorStatusFlag {
2379    fn default() -> Self {
2380        Self::DEFAULT
2381    }
2382}
2383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2385#[cfg_attr(feature = "serde", serde(tag = "type"))]
2386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2387#[repr(u32)]
2388#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2389pub enum MavGoto {
2390    #[doc = "Hold at the current position."]
2391    MAV_GOTO_DO_HOLD = 0,
2392    #[doc = "Continue with the next item in mission execution."]
2393    MAV_GOTO_DO_CONTINUE = 1,
2394    #[doc = "Hold at the current position of the system"]
2395    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2396    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2397    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2398}
2399impl MavGoto {
2400    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2401}
2402impl Default for MavGoto {
2403    fn default() -> Self {
2404        Self::DEFAULT
2405    }
2406}
2407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2409#[cfg_attr(feature = "serde", serde(tag = "type"))]
2410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2411#[repr(u32)]
2412#[doc = "Enumeration of landed detector states"]
2413pub enum MavLandedState {
2414    #[doc = "MAV landed state is unknown"]
2415    MAV_LANDED_STATE_UNDEFINED = 0,
2416    #[doc = "MAV is landed (on ground)"]
2417    MAV_LANDED_STATE_ON_GROUND = 1,
2418    #[doc = "MAV is in air"]
2419    MAV_LANDED_STATE_IN_AIR = 2,
2420    #[doc = "MAV currently taking off"]
2421    MAV_LANDED_STATE_TAKEOFF = 3,
2422    #[doc = "MAV currently landing"]
2423    MAV_LANDED_STATE_LANDING = 4,
2424}
2425impl MavLandedState {
2426    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2427}
2428impl Default for MavLandedState {
2429    fn default() -> Self {
2430        Self::DEFAULT
2431    }
2432}
2433#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2435#[cfg_attr(feature = "serde", serde(tag = "type"))]
2436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2437#[repr(u32)]
2438#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2439pub enum MavMissionResult {
2440    #[doc = "mission accepted OK"]
2441    MAV_MISSION_ACCEPTED = 0,
2442    #[doc = "Generic error / not accepting mission commands at all right now."]
2443    MAV_MISSION_ERROR = 1,
2444    #[doc = "Coordinate frame is not supported."]
2445    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2446    #[doc = "Command is not supported."]
2447    MAV_MISSION_UNSUPPORTED = 3,
2448    #[doc = "Mission items exceed storage space."]
2449    MAV_MISSION_NO_SPACE = 4,
2450    #[doc = "One of the parameters has an invalid value."]
2451    MAV_MISSION_INVALID = 5,
2452    #[doc = "param1 has an invalid value."]
2453    MAV_MISSION_INVALID_PARAM1 = 6,
2454    #[doc = "param2 has an invalid value."]
2455    MAV_MISSION_INVALID_PARAM2 = 7,
2456    #[doc = "param3 has an invalid value."]
2457    MAV_MISSION_INVALID_PARAM3 = 8,
2458    #[doc = "param4 has an invalid value."]
2459    MAV_MISSION_INVALID_PARAM4 = 9,
2460    #[doc = "x / param5 has an invalid value."]
2461    MAV_MISSION_INVALID_PARAM5_X = 10,
2462    #[doc = "y / param6 has an invalid value."]
2463    MAV_MISSION_INVALID_PARAM6_Y = 11,
2464    #[doc = "z / param7 has an invalid value."]
2465    MAV_MISSION_INVALID_PARAM7 = 12,
2466    #[doc = "Mission item received out of sequence"]
2467    MAV_MISSION_INVALID_SEQUENCE = 13,
2468    #[doc = "Not accepting any mission commands from this communication partner."]
2469    MAV_MISSION_DENIED = 14,
2470    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2471    MAV_MISSION_OPERATION_CANCELLED = 15,
2472}
2473impl MavMissionResult {
2474    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2475}
2476impl Default for MavMissionResult {
2477    fn default() -> Self {
2478        Self::DEFAULT
2479    }
2480}
2481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2483#[cfg_attr(feature = "serde", serde(tag = "type"))]
2484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2485#[repr(u32)]
2486#[doc = "Type of mission items being requested/sent in mission protocol."]
2487pub enum MavMissionType {
2488    #[doc = "Items are mission commands for main mission."]
2489    MAV_MISSION_TYPE_MISSION = 0,
2490    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2491    MAV_MISSION_TYPE_FENCE = 1,
2492    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2493    MAV_MISSION_TYPE_RALLY = 2,
2494    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2495    MAV_MISSION_TYPE_ALL = 255,
2496}
2497impl MavMissionType {
2498    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2499}
2500impl Default for MavMissionType {
2501    fn default() -> Self {
2502        Self::DEFAULT
2503    }
2504}
2505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2507#[cfg_attr(feature = "serde", serde(tag = "type"))]
2508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2509#[repr(u32)]
2510#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2511pub enum MavMode {
2512    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2513    MAV_MODE_PREFLIGHT = 0,
2514    #[doc = "System is allowed to be active, under assisted RC control."]
2515    MAV_MODE_STABILIZE_DISARMED = 80,
2516    #[doc = "System is allowed to be active, under assisted RC control."]
2517    MAV_MODE_STABILIZE_ARMED = 208,
2518    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2519    MAV_MODE_MANUAL_DISARMED = 64,
2520    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2521    MAV_MODE_MANUAL_ARMED = 192,
2522    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2523    MAV_MODE_GUIDED_DISARMED = 88,
2524    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2525    MAV_MODE_GUIDED_ARMED = 216,
2526    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2527    MAV_MODE_AUTO_DISARMED = 92,
2528    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2529    MAV_MODE_AUTO_ARMED = 220,
2530    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2531    MAV_MODE_TEST_DISARMED = 66,
2532    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2533    MAV_MODE_TEST_ARMED = 194,
2534}
2535impl MavMode {
2536    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2537}
2538impl Default for MavMode {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2544impl MavModeFlag {
2545    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2546}
2547impl Default for MavModeFlag {
2548    fn default() -> Self {
2549        Self::DEFAULT
2550    }
2551}
2552#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2554#[cfg_attr(feature = "serde", serde(tag = "type"))]
2555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2556#[repr(u32)]
2557#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2558pub enum MavModeFlagDecodePosition {
2559    #[doc = "First bit:  10000000"]
2560    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2561    #[doc = "Second bit: 01000000"]
2562    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2563    #[doc = "Third bit:  00100000"]
2564    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2565    #[doc = "Fourth bit: 00010000"]
2566    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2567    #[doc = "Fifth bit:  00001000"]
2568    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2569    #[doc = "Sixth bit:   00000100"]
2570    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2571    #[doc = "Seventh bit: 00000010"]
2572    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2573    #[doc = "Eighth bit: 00000001"]
2574    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2575}
2576impl MavModeFlagDecodePosition {
2577    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2578}
2579impl Default for MavModeFlagDecodePosition {
2580    fn default() -> Self {
2581        Self::DEFAULT
2582    }
2583}
2584bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2585impl MavModeProperty {
2586    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2587}
2588impl Default for MavModeProperty {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2599#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2600pub enum MavMountMode {
2601    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2602    MAV_MOUNT_MODE_RETRACT = 0,
2603    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2604    MAV_MOUNT_MODE_NEUTRAL = 1,
2605    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2606    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2607    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2608    MAV_MOUNT_MODE_RC_TARGETING = 3,
2609    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2610    MAV_MOUNT_MODE_GPS_POINT = 4,
2611    #[doc = "Gimbal tracks system with specified system ID"]
2612    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2613    #[doc = "Gimbal tracks home position"]
2614    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2615}
2616impl MavMountMode {
2617    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2618}
2619impl Default for MavMountMode {
2620    fn default() -> Self {
2621        Self::DEFAULT
2622    }
2623}
2624#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2626#[cfg_attr(feature = "serde", serde(tag = "type"))]
2627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2628#[repr(u32)]
2629pub enum MavOdidArmStatus {
2630    #[doc = "Passing arming checks."]
2631    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2632    #[doc = "Generic arming failure, see error string for details."]
2633    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2634}
2635impl MavOdidArmStatus {
2636    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2637}
2638impl Default for MavOdidArmStatus {
2639    fn default() -> Self {
2640        Self::DEFAULT
2641    }
2642}
2643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2645#[cfg_attr(feature = "serde", serde(tag = "type"))]
2646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2647#[repr(u32)]
2648pub enum MavOdidAuthType {
2649    #[doc = "No authentication type is specified."]
2650    MAV_ODID_AUTH_TYPE_NONE = 0,
2651    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2652    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2653    #[doc = "Signature for the Operator ID."]
2654    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2655    #[doc = "Signature for the entire message set."]
2656    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2657    #[doc = "Authentication is provided by Network Remote ID."]
2658    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2659    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2660    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2661}
2662impl MavOdidAuthType {
2663    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2664}
2665impl Default for MavOdidAuthType {
2666    fn default() -> Self {
2667        Self::DEFAULT
2668    }
2669}
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675pub enum MavOdidCategoryEu {
2676    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2677    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2678    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2679    MAV_ODID_CATEGORY_EU_OPEN = 1,
2680    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2681    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2682    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2683    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2684}
2685impl MavOdidCategoryEu {
2686    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2687}
2688impl Default for MavOdidCategoryEu {
2689    fn default() -> Self {
2690        Self::DEFAULT
2691    }
2692}
2693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2695#[cfg_attr(feature = "serde", serde(tag = "type"))]
2696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2697#[repr(u32)]
2698pub enum MavOdidClassEu {
2699    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2700    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2701    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2702    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2703    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2704    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2705    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2706    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2707    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2708    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2709    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2710    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2711    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2712    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2713    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2714    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2715}
2716impl MavOdidClassEu {
2717    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2718}
2719impl Default for MavOdidClassEu {
2720    fn default() -> Self {
2721        Self::DEFAULT
2722    }
2723}
2724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2726#[cfg_attr(feature = "serde", serde(tag = "type"))]
2727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2728#[repr(u32)]
2729pub enum MavOdidClassificationType {
2730    #[doc = "The classification type for the UA is undeclared."]
2731    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2732    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2733    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2734}
2735impl MavOdidClassificationType {
2736    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2737}
2738impl Default for MavOdidClassificationType {
2739    fn default() -> Self {
2740        Self::DEFAULT
2741    }
2742}
2743#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2745#[cfg_attr(feature = "serde", serde(tag = "type"))]
2746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2747#[repr(u32)]
2748pub enum MavOdidDescType {
2749    #[doc = "Optional free-form text description of the purpose of the flight."]
2750    MAV_ODID_DESC_TYPE_TEXT = 0,
2751    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2752    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2753    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2754    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2755}
2756impl MavOdidDescType {
2757    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2758}
2759impl Default for MavOdidDescType {
2760    fn default() -> Self {
2761        Self::DEFAULT
2762    }
2763}
2764#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2766#[cfg_attr(feature = "serde", serde(tag = "type"))]
2767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2768#[repr(u32)]
2769pub enum MavOdidHeightRef {
2770    #[doc = "The height field is relative to the take-off location."]
2771    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2772    #[doc = "The height field is relative to ground."]
2773    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2774}
2775impl MavOdidHeightRef {
2776    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2777}
2778impl Default for MavOdidHeightRef {
2779    fn default() -> Self {
2780        Self::DEFAULT
2781    }
2782}
2783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2785#[cfg_attr(feature = "serde", serde(tag = "type"))]
2786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2787#[repr(u32)]
2788pub enum MavOdidHorAcc {
2789    #[doc = "The horizontal accuracy is unknown."]
2790    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2791    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2792    MAV_ODID_HOR_ACC_10NM = 1,
2793    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2794    MAV_ODID_HOR_ACC_4NM = 2,
2795    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2796    MAV_ODID_HOR_ACC_2NM = 3,
2797    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2798    MAV_ODID_HOR_ACC_1NM = 4,
2799    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2800    MAV_ODID_HOR_ACC_0_5NM = 5,
2801    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2802    MAV_ODID_HOR_ACC_0_3NM = 6,
2803    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2804    MAV_ODID_HOR_ACC_0_1NM = 7,
2805    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2806    MAV_ODID_HOR_ACC_0_05NM = 8,
2807    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2808    MAV_ODID_HOR_ACC_30_METER = 9,
2809    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2810    MAV_ODID_HOR_ACC_10_METER = 10,
2811    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2812    MAV_ODID_HOR_ACC_3_METER = 11,
2813    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2814    MAV_ODID_HOR_ACC_1_METER = 12,
2815}
2816impl MavOdidHorAcc {
2817    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2818}
2819impl Default for MavOdidHorAcc {
2820    fn default() -> Self {
2821        Self::DEFAULT
2822    }
2823}
2824#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2826#[cfg_attr(feature = "serde", serde(tag = "type"))]
2827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2828#[repr(u32)]
2829pub enum MavOdidIdType {
2830    #[doc = "No type defined."]
2831    MAV_ODID_ID_TYPE_NONE = 0,
2832    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2833    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2834    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2835    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2836    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2837    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2838    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2839    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2840}
2841impl MavOdidIdType {
2842    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2843}
2844impl Default for MavOdidIdType {
2845    fn default() -> Self {
2846        Self::DEFAULT
2847    }
2848}
2849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2851#[cfg_attr(feature = "serde", serde(tag = "type"))]
2852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2853#[repr(u32)]
2854pub enum MavOdidOperatorIdType {
2855    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2856    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2857}
2858impl MavOdidOperatorIdType {
2859    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2860}
2861impl Default for MavOdidOperatorIdType {
2862    fn default() -> Self {
2863        Self::DEFAULT
2864    }
2865}
2866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2868#[cfg_attr(feature = "serde", serde(tag = "type"))]
2869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2870#[repr(u32)]
2871pub enum MavOdidOperatorLocationType {
2872    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2873    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2874    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2875    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2876    #[doc = "The location/altitude of the operator are fixed values."]
2877    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2878}
2879impl MavOdidOperatorLocationType {
2880    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2881}
2882impl Default for MavOdidOperatorLocationType {
2883    fn default() -> Self {
2884        Self::DEFAULT
2885    }
2886}
2887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2889#[cfg_attr(feature = "serde", serde(tag = "type"))]
2890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2891#[repr(u32)]
2892pub enum MavOdidSpeedAcc {
2893    #[doc = "The speed accuracy is unknown."]
2894    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2895    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2896    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2897    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2898    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2899    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2900    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2901    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2902    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2903}
2904impl MavOdidSpeedAcc {
2905    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2906}
2907impl Default for MavOdidSpeedAcc {
2908    fn default() -> Self {
2909        Self::DEFAULT
2910    }
2911}
2912#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2914#[cfg_attr(feature = "serde", serde(tag = "type"))]
2915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2916#[repr(u32)]
2917pub enum MavOdidStatus {
2918    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2919    MAV_ODID_STATUS_UNDECLARED = 0,
2920    #[doc = "The UA is on the ground."]
2921    MAV_ODID_STATUS_GROUND = 1,
2922    #[doc = "The UA is in the air."]
2923    MAV_ODID_STATUS_AIRBORNE = 2,
2924    #[doc = "The UA is having an emergency."]
2925    MAV_ODID_STATUS_EMERGENCY = 3,
2926    #[doc = "The remote ID system is failing or unreliable in some way."]
2927    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2928}
2929impl MavOdidStatus {
2930    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2931}
2932impl Default for MavOdidStatus {
2933    fn default() -> Self {
2934        Self::DEFAULT
2935    }
2936}
2937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2939#[cfg_attr(feature = "serde", serde(tag = "type"))]
2940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2941#[repr(u32)]
2942pub enum MavOdidTimeAcc {
2943    #[doc = "The timestamp accuracy is unknown."]
2944    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2945    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2946    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2947    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2948    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2949    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2950    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2951    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2952    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2953    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2954    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2955    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2956    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2957    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2958    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2959    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2960    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2961    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2962    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2963    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2964    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2965    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2966    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2967    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2968    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2969    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2970    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2971    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2972    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2973    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2974    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2975}
2976impl MavOdidTimeAcc {
2977    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2978}
2979impl Default for MavOdidTimeAcc {
2980    fn default() -> Self {
2981        Self::DEFAULT
2982    }
2983}
2984#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2986#[cfg_attr(feature = "serde", serde(tag = "type"))]
2987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2988#[repr(u32)]
2989pub enum MavOdidUaType {
2990    #[doc = "No UA (Unmanned Aircraft) type defined."]
2991    MAV_ODID_UA_TYPE_NONE = 0,
2992    #[doc = "Aeroplane/Airplane. Fixed wing."]
2993    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2994    #[doc = "Helicopter or multirotor."]
2995    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2996    #[doc = "Gyroplane."]
2997    MAV_ODID_UA_TYPE_GYROPLANE = 3,
2998    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
2999    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3000    #[doc = "Ornithopter."]
3001    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3002    #[doc = "Glider."]
3003    MAV_ODID_UA_TYPE_GLIDER = 6,
3004    #[doc = "Kite."]
3005    MAV_ODID_UA_TYPE_KITE = 7,
3006    #[doc = "Free Balloon."]
3007    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3008    #[doc = "Captive Balloon."]
3009    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3010    #[doc = "Airship. E.g. a blimp."]
3011    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3012    #[doc = "Free Fall/Parachute (unpowered)."]
3013    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3014    #[doc = "Rocket."]
3015    MAV_ODID_UA_TYPE_ROCKET = 12,
3016    #[doc = "Tethered powered aircraft."]
3017    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3018    #[doc = "Ground Obstacle."]
3019    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3020    #[doc = "Other type of aircraft not listed earlier."]
3021    MAV_ODID_UA_TYPE_OTHER = 15,
3022}
3023impl MavOdidUaType {
3024    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3025}
3026impl Default for MavOdidUaType {
3027    fn default() -> Self {
3028        Self::DEFAULT
3029    }
3030}
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidVerAcc {
3037    #[doc = "The vertical accuracy is unknown."]
3038    MAV_ODID_VER_ACC_UNKNOWN = 0,
3039    #[doc = "The vertical accuracy is smaller than 150 meter."]
3040    MAV_ODID_VER_ACC_150_METER = 1,
3041    #[doc = "The vertical accuracy is smaller than 45 meter."]
3042    MAV_ODID_VER_ACC_45_METER = 2,
3043    #[doc = "The vertical accuracy is smaller than 25 meter."]
3044    MAV_ODID_VER_ACC_25_METER = 3,
3045    #[doc = "The vertical accuracy is smaller than 10 meter."]
3046    MAV_ODID_VER_ACC_10_METER = 4,
3047    #[doc = "The vertical accuracy is smaller than 3 meter."]
3048    MAV_ODID_VER_ACC_3_METER = 5,
3049    #[doc = "The vertical accuracy is smaller than 1 meter."]
3050    MAV_ODID_VER_ACC_1_METER = 6,
3051}
3052impl MavOdidVerAcc {
3053    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3054}
3055impl Default for MavOdidVerAcc {
3056    fn default() -> Self {
3057        Self::DEFAULT
3058    }
3059}
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3066pub enum MavParamExtType {
3067    #[doc = "8-bit unsigned integer"]
3068    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3069    #[doc = "8-bit signed integer"]
3070    MAV_PARAM_EXT_TYPE_INT8 = 2,
3071    #[doc = "16-bit unsigned integer"]
3072    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3073    #[doc = "16-bit signed integer"]
3074    MAV_PARAM_EXT_TYPE_INT16 = 4,
3075    #[doc = "32-bit unsigned integer"]
3076    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3077    #[doc = "32-bit signed integer"]
3078    MAV_PARAM_EXT_TYPE_INT32 = 6,
3079    #[doc = "64-bit unsigned integer"]
3080    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3081    #[doc = "64-bit signed integer"]
3082    MAV_PARAM_EXT_TYPE_INT64 = 8,
3083    #[doc = "32-bit floating-point"]
3084    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3085    #[doc = "64-bit floating-point"]
3086    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3087    #[doc = "Custom Type"]
3088    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3089}
3090impl MavParamExtType {
3091    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3092}
3093impl Default for MavParamExtType {
3094    fn default() -> Self {
3095        Self::DEFAULT
3096    }
3097}
3098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3100#[cfg_attr(feature = "serde", serde(tag = "type"))]
3101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3102#[repr(u32)]
3103#[doc = "Specifies the datatype of a MAVLink parameter."]
3104pub enum MavParamType {
3105    #[doc = "8-bit unsigned integer"]
3106    MAV_PARAM_TYPE_UINT8 = 1,
3107    #[doc = "8-bit signed integer"]
3108    MAV_PARAM_TYPE_INT8 = 2,
3109    #[doc = "16-bit unsigned integer"]
3110    MAV_PARAM_TYPE_UINT16 = 3,
3111    #[doc = "16-bit signed integer"]
3112    MAV_PARAM_TYPE_INT16 = 4,
3113    #[doc = "32-bit unsigned integer"]
3114    MAV_PARAM_TYPE_UINT32 = 5,
3115    #[doc = "32-bit signed integer"]
3116    MAV_PARAM_TYPE_INT32 = 6,
3117    #[doc = "64-bit unsigned integer"]
3118    MAV_PARAM_TYPE_UINT64 = 7,
3119    #[doc = "64-bit signed integer"]
3120    MAV_PARAM_TYPE_INT64 = 8,
3121    #[doc = "32-bit floating-point"]
3122    MAV_PARAM_TYPE_REAL32 = 9,
3123    #[doc = "64-bit floating-point"]
3124    MAV_PARAM_TYPE_REAL64 = 10,
3125}
3126impl MavParamType {
3127    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3128}
3129impl Default for MavParamType {
3130    fn default() -> Self {
3131        Self::DEFAULT
3132    }
3133}
3134bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3135impl MavPowerStatus {
3136    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3137}
3138impl Default for MavPowerStatus {
3139    fn default() -> Self {
3140        Self::DEFAULT
3141    }
3142}
3143bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3144impl MavProtocolCapability {
3145    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3146}
3147impl Default for MavProtocolCapability {
3148    fn default() -> Self {
3149        Self::DEFAULT
3150    }
3151}
3152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3154#[cfg_attr(feature = "serde", serde(tag = "type"))]
3155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3156#[repr(u32)]
3157#[doc = "Result from a MAVLink command (MAV_CMD)"]
3158pub enum MavResult {
3159    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3160    MAV_RESULT_ACCEPTED = 0,
3161    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3162    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3163    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3164    MAV_RESULT_DENIED = 2,
3165    #[doc = "Command is not supported (unknown)."]
3166    MAV_RESULT_UNSUPPORTED = 3,
3167    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3168    MAV_RESULT_FAILED = 4,
3169    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3170    MAV_RESULT_IN_PROGRESS = 5,
3171    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3172    MAV_RESULT_CANCELLED = 6,
3173    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3174    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3175    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3176    MAV_RESULT_COMMAND_INT_ONLY = 8,
3177    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3178    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3179}
3180impl MavResult {
3181    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3182}
3183impl Default for MavResult {
3184    fn default() -> Self {
3185        Self::DEFAULT
3186    }
3187}
3188#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3190#[cfg_attr(feature = "serde", serde(tag = "type"))]
3191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3192#[repr(u32)]
3193#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3194#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3195pub enum MavRoi {
3196    #[doc = "No region of interest."]
3197    MAV_ROI_NONE = 0,
3198    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3199    MAV_ROI_WPNEXT = 1,
3200    #[doc = "Point toward given waypoint."]
3201    MAV_ROI_WPINDEX = 2,
3202    #[doc = "Point toward fixed location."]
3203    MAV_ROI_LOCATION = 3,
3204    #[doc = "Point toward of given id."]
3205    MAV_ROI_TARGET = 4,
3206}
3207impl MavRoi {
3208    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3209}
3210impl Default for MavRoi {
3211    fn default() -> Self {
3212        Self::DEFAULT
3213    }
3214}
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220#[doc = "Enumeration of sensor orientation, according to its rotations"]
3221pub enum MavSensorOrientation {
3222    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3223    MAV_SENSOR_ROTATION_NONE = 0,
3224    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3225    MAV_SENSOR_ROTATION_YAW_45 = 1,
3226    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3227    MAV_SENSOR_ROTATION_YAW_90 = 2,
3228    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3229    MAV_SENSOR_ROTATION_YAW_135 = 3,
3230    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3231    MAV_SENSOR_ROTATION_YAW_180 = 4,
3232    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3233    MAV_SENSOR_ROTATION_YAW_225 = 5,
3234    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3235    MAV_SENSOR_ROTATION_YAW_270 = 6,
3236    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3237    MAV_SENSOR_ROTATION_YAW_315 = 7,
3238    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3239    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3240    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3241    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3242    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3243    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3244    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3245    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3246    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3247    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3248    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3249    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3250    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3251    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3252    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3253    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3254    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3255    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3256    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3257    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3258    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3259    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3260    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3261    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3262    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3263    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3264    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3265    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3266    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3267    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3268    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3269    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3270    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3272    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3273    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3274    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3276    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3277    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3278    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3279    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3280    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3281    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3282    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3283    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3284    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3285    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3286    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3288    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3289    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3290    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3291    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3292    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3293    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3294    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3295    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3296    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3297    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3298    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3299    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3300    #[doc = "Pitch: 315"]
3301    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3302    #[doc = "Roll: 90, Pitch: 315"]
3303    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3304    #[doc = "Custom orientation"]
3305    MAV_SENSOR_ROTATION_CUSTOM = 100,
3306}
3307impl MavSensorOrientation {
3308    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3309}
3310impl Default for MavSensorOrientation {
3311    fn default() -> Self {
3312        Self::DEFAULT
3313    }
3314}
3315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3317#[cfg_attr(feature = "serde", serde(tag = "type"))]
3318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3319#[repr(u32)]
3320#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3321pub enum MavSeverity {
3322    #[doc = "System is unusable. This is a \"panic\" condition."]
3323    MAV_SEVERITY_EMERGENCY = 0,
3324    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3325    MAV_SEVERITY_ALERT = 1,
3326    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3327    MAV_SEVERITY_CRITICAL = 2,
3328    #[doc = "Indicates an error in secondary/redundant systems."]
3329    MAV_SEVERITY_ERROR = 3,
3330    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3331    MAV_SEVERITY_WARNING = 4,
3332    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3333    MAV_SEVERITY_NOTICE = 5,
3334    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3335    MAV_SEVERITY_INFO = 6,
3336    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3337    MAV_SEVERITY_DEBUG = 7,
3338}
3339impl MavSeverity {
3340    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3341}
3342impl Default for MavSeverity {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3353pub enum MavStandardMode {
3354    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3355    MAV_STANDARD_MODE_NON_STANDARD = 0,
3356    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3357    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3358    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3359    MAV_STANDARD_MODE_ORBIT = 2,
3360    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3361    MAV_STANDARD_MODE_CRUISE = 3,
3362    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3363    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3364    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3365    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3366    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3367    MAV_STANDARD_MODE_MISSION = 6,
3368    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3369    MAV_STANDARD_MODE_LAND = 7,
3370    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3371    MAV_STANDARD_MODE_TAKEOFF = 8,
3372}
3373impl MavStandardMode {
3374    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3375}
3376impl Default for MavStandardMode {
3377    fn default() -> Self {
3378        Self::DEFAULT
3379    }
3380}
3381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3383#[cfg_attr(feature = "serde", serde(tag = "type"))]
3384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3385#[repr(u32)]
3386pub enum MavState {
3387    #[doc = "Uninitialized system, state is unknown."]
3388    MAV_STATE_UNINIT = 0,
3389    #[doc = "System is booting up."]
3390    MAV_STATE_BOOT = 1,
3391    #[doc = "System is calibrating and not flight-ready."]
3392    MAV_STATE_CALIBRATING = 2,
3393    #[doc = "System is grounded and on standby. It can be launched any time."]
3394    MAV_STATE_STANDBY = 3,
3395    #[doc = "System is active and might be already airborne. Motors are engaged."]
3396    MAV_STATE_ACTIVE = 4,
3397    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3398    MAV_STATE_CRITICAL = 5,
3399    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3400    MAV_STATE_EMERGENCY = 6,
3401    #[doc = "System just initialized its power-down sequence, will shut down now."]
3402    MAV_STATE_POWEROFF = 7,
3403    #[doc = "System is terminating itself (failsafe or commanded)."]
3404    MAV_STATE_FLIGHT_TERMINATION = 8,
3405}
3406impl MavState {
3407    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3408}
3409impl Default for MavState {
3410    fn default() -> Self {
3411        Self::DEFAULT
3412    }
3413}
3414bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3415impl MavSysStatusSensor {
3416    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3417}
3418impl Default for MavSysStatusSensor {
3419    fn default() -> Self {
3420        Self::DEFAULT
3421    }
3422}
3423bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3424impl MavSysStatusSensorExtended {
3425    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3426}
3427impl Default for MavSysStatusSensorExtended {
3428    fn default() -> Self {
3429        Self::DEFAULT
3430    }
3431}
3432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3434#[cfg_attr(feature = "serde", serde(tag = "type"))]
3435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3436#[repr(u32)]
3437pub enum MavTunnelPayloadType {
3438    #[doc = "Encoding of payload unknown."]
3439    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3440    #[doc = "Registered for STorM32 gimbal controller."]
3441    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3442    #[doc = "Registered for STorM32 gimbal controller."]
3443    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3444    #[doc = "Registered for STorM32 gimbal controller."]
3445    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3446    #[doc = "Registered for STorM32 gimbal controller."]
3447    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3448    #[doc = "Registered for STorM32 gimbal controller."]
3449    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3450    #[doc = "Registered for STorM32 gimbal controller."]
3451    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3452    #[doc = "Registered for STorM32 gimbal controller."]
3453    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3454    #[doc = "Registered for STorM32 gimbal controller."]
3455    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3456    #[doc = "Registered for STorM32 gimbal controller."]
3457    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3458    #[doc = "Registered for STorM32 gimbal controller."]
3459    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3460    #[doc = "Registered for ModalAI remote OSD protocol."]
3461    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3462    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3463    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3464    #[doc = "Registered for ModalAI vendor use."]
3465    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3466}
3467impl MavTunnelPayloadType {
3468    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3469}
3470impl Default for MavTunnelPayloadType {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3477#[cfg_attr(feature = "serde", serde(tag = "type"))]
3478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3479#[repr(u32)]
3480#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3481pub enum MavType {
3482    #[doc = "Generic micro air vehicle"]
3483    MAV_TYPE_GENERIC = 0,
3484    #[doc = "Fixed wing aircraft."]
3485    MAV_TYPE_FIXED_WING = 1,
3486    #[doc = "Quadrotor"]
3487    MAV_TYPE_QUADROTOR = 2,
3488    #[doc = "Coaxial helicopter"]
3489    MAV_TYPE_COAXIAL = 3,
3490    #[doc = "Normal helicopter with tail rotor."]
3491    MAV_TYPE_HELICOPTER = 4,
3492    #[doc = "Ground installation"]
3493    MAV_TYPE_ANTENNA_TRACKER = 5,
3494    #[doc = "Operator control unit / ground control station"]
3495    MAV_TYPE_GCS = 6,
3496    #[doc = "Airship, controlled"]
3497    MAV_TYPE_AIRSHIP = 7,
3498    #[doc = "Free balloon, uncontrolled"]
3499    MAV_TYPE_FREE_BALLOON = 8,
3500    #[doc = "Rocket"]
3501    MAV_TYPE_ROCKET = 9,
3502    #[doc = "Ground rover"]
3503    MAV_TYPE_GROUND_ROVER = 10,
3504    #[doc = "Surface vessel, boat, ship"]
3505    MAV_TYPE_SURFACE_BOAT = 11,
3506    #[doc = "Submarine"]
3507    MAV_TYPE_SUBMARINE = 12,
3508    #[doc = "Hexarotor"]
3509    MAV_TYPE_HEXAROTOR = 13,
3510    #[doc = "Octorotor"]
3511    MAV_TYPE_OCTOROTOR = 14,
3512    #[doc = "Tricopter"]
3513    MAV_TYPE_TRICOPTER = 15,
3514    #[doc = "Flapping wing"]
3515    MAV_TYPE_FLAPPING_WING = 16,
3516    #[doc = "Kite"]
3517    MAV_TYPE_KITE = 17,
3518    #[doc = "Onboard companion controller"]
3519    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3520    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3521    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3522    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3523    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3524    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3525    MAV_TYPE_VTOL_TILTROTOR = 21,
3526    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3527    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3528    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3529    MAV_TYPE_VTOL_TAILSITTER = 23,
3530    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3531    MAV_TYPE_VTOL_TILTWING = 24,
3532    #[doc = "VTOL reserved 5"]
3533    MAV_TYPE_VTOL_RESERVED5 = 25,
3534    #[doc = "Gimbal"]
3535    MAV_TYPE_GIMBAL = 26,
3536    #[doc = "ADSB system"]
3537    MAV_TYPE_ADSB = 27,
3538    #[doc = "Steerable, nonrigid airfoil"]
3539    MAV_TYPE_PARAFOIL = 28,
3540    #[doc = "Dodecarotor"]
3541    MAV_TYPE_DODECAROTOR = 29,
3542    #[doc = "Camera"]
3543    MAV_TYPE_CAMERA = 30,
3544    #[doc = "Charging station"]
3545    MAV_TYPE_CHARGING_STATION = 31,
3546    #[doc = "FLARM collision avoidance system"]
3547    MAV_TYPE_FLARM = 32,
3548    #[doc = "Servo"]
3549    MAV_TYPE_SERVO = 33,
3550    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3551    MAV_TYPE_ODID = 34,
3552    #[doc = "Decarotor"]
3553    MAV_TYPE_DECAROTOR = 35,
3554    #[doc = "Battery"]
3555    MAV_TYPE_BATTERY = 36,
3556    #[doc = "Parachute"]
3557    MAV_TYPE_PARACHUTE = 37,
3558    #[doc = "Log"]
3559    MAV_TYPE_LOG = 38,
3560    #[doc = "OSD"]
3561    MAV_TYPE_OSD = 39,
3562    #[doc = "IMU"]
3563    MAV_TYPE_IMU = 40,
3564    #[doc = "GPS"]
3565    MAV_TYPE_GPS = 41,
3566    #[doc = "Winch"]
3567    MAV_TYPE_WINCH = 42,
3568    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3569    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3570    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3571    MAV_TYPE_ILLUMINATOR = 44,
3572    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3573    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3574}
3575impl MavType {
3576    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3577}
3578impl Default for MavType {
3579    fn default() -> Self {
3580        Self::DEFAULT
3581    }
3582}
3583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3585#[cfg_attr(feature = "serde", serde(tag = "type"))]
3586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3587#[repr(u32)]
3588#[doc = "Enumeration of VTOL states"]
3589pub enum MavVtolState {
3590    #[doc = "MAV is not configured as VTOL"]
3591    MAV_VTOL_STATE_UNDEFINED = 0,
3592    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3593    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3594    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3595    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3596    #[doc = "VTOL is in multicopter state"]
3597    MAV_VTOL_STATE_MC = 3,
3598    #[doc = "VTOL is in fixed-wing state"]
3599    MAV_VTOL_STATE_FW = 4,
3600}
3601impl MavVtolState {
3602    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3603}
3604impl Default for MavVtolState {
3605    fn default() -> Self {
3606        Self::DEFAULT
3607    }
3608}
3609bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3610impl MavWinchStatusFlag {
3611    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3612}
3613impl Default for MavWinchStatusFlag {
3614    fn default() -> Self {
3615        Self::DEFAULT
3616    }
3617}
3618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3620#[cfg_attr(feature = "serde", serde(tag = "type"))]
3621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3622#[repr(u32)]
3623pub enum MavlinkDataStreamType {
3624    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3625    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3626    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3627    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3628    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3629    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3630}
3631impl MavlinkDataStreamType {
3632    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3633}
3634impl Default for MavlinkDataStreamType {
3635    fn default() -> Self {
3636        Self::DEFAULT
3637    }
3638}
3639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3641#[cfg_attr(feature = "serde", serde(tag = "type"))]
3642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3643#[repr(u32)]
3644#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3645pub enum MissionState {
3646    #[doc = "The mission status reporting is not supported."]
3647    MISSION_STATE_UNKNOWN = 0,
3648    #[doc = "No mission on the vehicle."]
3649    MISSION_STATE_NO_MISSION = 1,
3650    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3651    MISSION_STATE_NOT_STARTED = 2,
3652    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3653    MISSION_STATE_ACTIVE = 3,
3654    #[doc = "Mission is paused when in auto mode."]
3655    MISSION_STATE_PAUSED = 4,
3656    #[doc = "Mission has executed all mission items."]
3657    MISSION_STATE_COMPLETE = 5,
3658}
3659impl MissionState {
3660    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3661}
3662impl Default for MissionState {
3663    fn default() -> Self {
3664        Self::DEFAULT
3665    }
3666}
3667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3669#[cfg_attr(feature = "serde", serde(tag = "type"))]
3670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3671#[repr(u32)]
3672#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3673pub enum MotorTestOrder {
3674    #[doc = "Default autopilot motor test method."]
3675    MOTOR_TEST_ORDER_DEFAULT = 0,
3676    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3677    MOTOR_TEST_ORDER_SEQUENCE = 1,
3678    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3679    MOTOR_TEST_ORDER_BOARD = 2,
3680}
3681impl MotorTestOrder {
3682    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3683}
3684impl Default for MotorTestOrder {
3685    fn default() -> Self {
3686        Self::DEFAULT
3687    }
3688}
3689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3691#[cfg_attr(feature = "serde", serde(tag = "type"))]
3692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3693#[repr(u32)]
3694#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3695pub enum MotorTestThrottleType {
3696    #[doc = "Throttle as a percentage (0 ~ 100)"]
3697    MOTOR_TEST_THROTTLE_PERCENT = 0,
3698    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3699    MOTOR_TEST_THROTTLE_PWM = 1,
3700    #[doc = "Throttle pass-through from pilot's transmitter."]
3701    MOTOR_TEST_THROTTLE_PILOT = 2,
3702    #[doc = "Per-motor compass calibration test."]
3703    MOTOR_TEST_COMPASS_CAL = 3,
3704}
3705impl MotorTestThrottleType {
3706    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3707}
3708impl Default for MotorTestThrottleType {
3709    fn default() -> Self {
3710        Self::DEFAULT
3711    }
3712}
3713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3715#[cfg_attr(feature = "serde", serde(tag = "type"))]
3716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3717#[repr(u32)]
3718pub enum NavVtolLandOptions {
3719    #[doc = "Default autopilot landing behaviour."]
3720    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3721    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3722    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3723    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3724    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3725}
3726impl NavVtolLandOptions {
3727    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3728}
3729impl Default for NavVtolLandOptions {
3730    fn default() -> Self {
3731        Self::DEFAULT
3732    }
3733}
3734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3736#[cfg_attr(feature = "serde", serde(tag = "type"))]
3737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3738#[repr(u32)]
3739#[doc = "Yaw behaviour during orbit flight."]
3740pub enum OrbitYawBehaviour {
3741    #[doc = "Vehicle front points to the center (default)."]
3742    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3743    #[doc = "Vehicle front holds heading when message received."]
3744    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3745    #[doc = "Yaw uncontrolled."]
3746    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3747    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3748    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3749    #[doc = "Yaw controlled by RC input."]
3750    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3751    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3752    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3753}
3754impl OrbitYawBehaviour {
3755    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3756}
3757impl Default for OrbitYawBehaviour {
3758    fn default() -> Self {
3759        Self::DEFAULT
3760    }
3761}
3762#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3764#[cfg_attr(feature = "serde", serde(tag = "type"))]
3765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3766#[repr(u32)]
3767#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3768pub enum ParachuteAction {
3769    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3770    PARACHUTE_DISABLE = 0,
3771    #[doc = "Enable auto-release of parachute."]
3772    PARACHUTE_ENABLE = 1,
3773    #[doc = "Release parachute and kill motors."]
3774    PARACHUTE_RELEASE = 2,
3775}
3776impl ParachuteAction {
3777    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3778}
3779impl Default for ParachuteAction {
3780    fn default() -> Self {
3781        Self::DEFAULT
3782    }
3783}
3784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3786#[cfg_attr(feature = "serde", serde(tag = "type"))]
3787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3788#[repr(u32)]
3789#[doc = "Result from PARAM_EXT_SET message."]
3790pub enum ParamAck {
3791    #[doc = "Parameter value ACCEPTED and SET"]
3792    PARAM_ACK_ACCEPTED = 0,
3793    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3794    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3795    #[doc = "Parameter failed to set"]
3796    PARAM_ACK_FAILED = 2,
3797    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3798    PARAM_ACK_IN_PROGRESS = 3,
3799}
3800impl ParamAck {
3801    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3802}
3803impl Default for ParamAck {
3804    fn default() -> Self {
3805        Self::DEFAULT
3806    }
3807}
3808bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3809impl PositionTargetTypemask {
3810    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3811}
3812impl Default for PositionTargetTypemask {
3813    fn default() -> Self {
3814        Self::DEFAULT
3815    }
3816}
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3823pub enum PrecisionLandMode {
3824    #[doc = "Normal (non-precision) landing."]
3825    PRECISION_LAND_MODE_DISABLED = 0,
3826    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3827    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3828    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3829    PRECISION_LAND_MODE_REQUIRED = 2,
3830}
3831impl PrecisionLandMode {
3832    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3833}
3834impl Default for PrecisionLandMode {
3835    fn default() -> Self {
3836        Self::DEFAULT
3837    }
3838}
3839#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3841#[cfg_attr(feature = "serde", serde(tag = "type"))]
3842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3843#[repr(u32)]
3844#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3845pub enum PreflightStorageMissionAction {
3846    #[doc = "Read current mission data from persistent storage"]
3847    MISSION_READ_PERSISTENT = 0,
3848    #[doc = "Write current mission data to persistent storage"]
3849    MISSION_WRITE_PERSISTENT = 1,
3850    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3851    MISSION_RESET_DEFAULT = 2,
3852}
3853impl PreflightStorageMissionAction {
3854    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3855}
3856impl Default for PreflightStorageMissionAction {
3857    fn default() -> Self {
3858        Self::DEFAULT
3859    }
3860}
3861#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3863#[cfg_attr(feature = "serde", serde(tag = "type"))]
3864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3865#[repr(u32)]
3866#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3867pub enum PreflightStorageParameterAction {
3868    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3869    PARAM_READ_PERSISTENT = 0,
3870    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3871    PARAM_WRITE_PERSISTENT = 1,
3872    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3873    PARAM_RESET_CONFIG_DEFAULT = 2,
3874    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3875    PARAM_RESET_SENSOR_DEFAULT = 3,
3876    #[doc = "Reset all parameters, including operation counters, to default values"]
3877    PARAM_RESET_ALL_DEFAULT = 4,
3878}
3879impl PreflightStorageParameterAction {
3880    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3881}
3882impl Default for PreflightStorageParameterAction {
3883    fn default() -> Self {
3884        Self::DEFAULT
3885    }
3886}
3887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3889#[cfg_attr(feature = "serde", serde(tag = "type"))]
3890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3891#[repr(u32)]
3892#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3893pub enum RcSubType {
3894    #[doc = "Spektrum DSM2"]
3895    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3896    #[doc = "Spektrum DSMX"]
3897    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3898    #[doc = "Spektrum DSMX8"]
3899    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3900}
3901impl RcSubType {
3902    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3903}
3904impl Default for RcSubType {
3905    fn default() -> Self {
3906        Self::DEFAULT
3907    }
3908}
3909#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3911#[cfg_attr(feature = "serde", serde(tag = "type"))]
3912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3913#[repr(u32)]
3914#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3915pub enum RcType {
3916    #[doc = "Spektrum"]
3917    RC_TYPE_SPEKTRUM = 0,
3918    #[doc = "CRSF"]
3919    RC_TYPE_CRSF = 1,
3920}
3921impl RcType {
3922    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3923}
3924impl Default for RcType {
3925    fn default() -> Self {
3926        Self::DEFAULT
3927    }
3928}
3929#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3931#[cfg_attr(feature = "serde", serde(tag = "type"))]
3932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3933#[repr(u32)]
3934#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3935pub enum RebootShutdownConditions {
3936    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3937    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3938    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3939    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3940}
3941impl RebootShutdownConditions {
3942    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3943}
3944impl Default for RebootShutdownConditions {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3955pub enum RtkBaselineCoordinateSystem {
3956    #[doc = "Earth-centered, Earth-fixed"]
3957    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3958    #[doc = "RTK basestation centered, north, east, down"]
3959    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3960}
3961impl RtkBaselineCoordinateSystem {
3962    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3963}
3964impl Default for RtkBaselineCoordinateSystem {
3965    fn default() -> Self {
3966        Self::DEFAULT
3967    }
3968}
3969#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3971#[cfg_attr(feature = "serde", serde(tag = "type"))]
3972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3973#[repr(u32)]
3974#[doc = "Possible safety switch states."]
3975pub enum SafetySwitchState {
3976    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
3977    SAFETY_SWITCH_STATE_SAFE = 0,
3978    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
3979    SAFETY_SWITCH_STATE_DANGEROUS = 1,
3980}
3981impl SafetySwitchState {
3982    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
3983}
3984impl Default for SafetySwitchState {
3985    fn default() -> Self {
3986        Self::DEFAULT
3987    }
3988}
3989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3991#[cfg_attr(feature = "serde", serde(tag = "type"))]
3992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3993#[repr(u32)]
3994#[doc = "SERIAL_CONTROL device types"]
3995pub enum SerialControlDev {
3996    #[doc = "First telemetry port"]
3997    SERIAL_CONTROL_DEV_TELEM1 = 0,
3998    #[doc = "Second telemetry port"]
3999    SERIAL_CONTROL_DEV_TELEM2 = 1,
4000    #[doc = "First GPS port"]
4001    SERIAL_CONTROL_DEV_GPS1 = 2,
4002    #[doc = "Second GPS port"]
4003    SERIAL_CONTROL_DEV_GPS2 = 3,
4004    #[doc = "system shell"]
4005    SERIAL_CONTROL_DEV_SHELL = 10,
4006    #[doc = "SERIAL0"]
4007    SERIAL_CONTROL_SERIAL0 = 100,
4008    #[doc = "SERIAL1"]
4009    SERIAL_CONTROL_SERIAL1 = 101,
4010    #[doc = "SERIAL2"]
4011    SERIAL_CONTROL_SERIAL2 = 102,
4012    #[doc = "SERIAL3"]
4013    SERIAL_CONTROL_SERIAL3 = 103,
4014    #[doc = "SERIAL4"]
4015    SERIAL_CONTROL_SERIAL4 = 104,
4016    #[doc = "SERIAL5"]
4017    SERIAL_CONTROL_SERIAL5 = 105,
4018    #[doc = "SERIAL6"]
4019    SERIAL_CONTROL_SERIAL6 = 106,
4020    #[doc = "SERIAL7"]
4021    SERIAL_CONTROL_SERIAL7 = 107,
4022    #[doc = "SERIAL8"]
4023    SERIAL_CONTROL_SERIAL8 = 108,
4024    #[doc = "SERIAL9"]
4025    SERIAL_CONTROL_SERIAL9 = 109,
4026}
4027impl SerialControlDev {
4028    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4029}
4030impl Default for SerialControlDev {
4031    fn default() -> Self {
4032        Self::DEFAULT
4033    }
4034}
4035bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4036impl SerialControlFlag {
4037    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4038}
4039impl Default for SerialControlFlag {
4040    fn default() -> Self {
4041        Self::DEFAULT
4042    }
4043}
4044#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4046#[cfg_attr(feature = "serde", serde(tag = "type"))]
4047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4048#[repr(u32)]
4049#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4050pub enum SetFocusType {
4051    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4052    FOCUS_TYPE_STEP = 0,
4053    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4054    FOCUS_TYPE_CONTINUOUS = 1,
4055    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4056    FOCUS_TYPE_RANGE = 2,
4057    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4058    FOCUS_TYPE_METERS = 3,
4059    #[doc = "Focus automatically."]
4060    FOCUS_TYPE_AUTO = 4,
4061    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4062    FOCUS_TYPE_AUTO_SINGLE = 5,
4063    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4064    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4065}
4066impl SetFocusType {
4067    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4068}
4069impl Default for SetFocusType {
4070    fn default() -> Self {
4071        Self::DEFAULT
4072    }
4073}
4074#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4076#[cfg_attr(feature = "serde", serde(tag = "type"))]
4077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4078#[repr(u32)]
4079#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4080pub enum SpeedType {
4081    #[doc = "Airspeed"]
4082    SPEED_TYPE_AIRSPEED = 0,
4083    #[doc = "Groundspeed"]
4084    SPEED_TYPE_GROUNDSPEED = 1,
4085    #[doc = "Climb speed"]
4086    SPEED_TYPE_CLIMB_SPEED = 2,
4087    #[doc = "Descent speed"]
4088    SPEED_TYPE_DESCENT_SPEED = 3,
4089}
4090impl SpeedType {
4091    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4092}
4093impl Default for SpeedType {
4094    fn default() -> Self {
4095        Self::DEFAULT
4096    }
4097}
4098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4100#[cfg_attr(feature = "serde", serde(tag = "type"))]
4101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4102#[repr(u32)]
4103#[doc = "Flags to indicate the status of camera storage."]
4104pub enum StorageStatus {
4105    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4106    STORAGE_STATUS_EMPTY = 0,
4107    #[doc = "Storage present but unformatted."]
4108    STORAGE_STATUS_UNFORMATTED = 1,
4109    #[doc = "Storage present and ready."]
4110    STORAGE_STATUS_READY = 2,
4111    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4112    STORAGE_STATUS_NOT_SUPPORTED = 3,
4113}
4114impl StorageStatus {
4115    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4116}
4117impl Default for StorageStatus {
4118    fn default() -> Self {
4119        Self::DEFAULT
4120    }
4121}
4122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4124#[cfg_attr(feature = "serde", serde(tag = "type"))]
4125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4126#[repr(u32)]
4127#[doc = "Flags to indicate the type of storage."]
4128pub enum StorageType {
4129    #[doc = "Storage type is not known."]
4130    STORAGE_TYPE_UNKNOWN = 0,
4131    #[doc = "Storage type is USB device."]
4132    STORAGE_TYPE_USB_STICK = 1,
4133    #[doc = "Storage type is SD card."]
4134    STORAGE_TYPE_SD = 2,
4135    #[doc = "Storage type is microSD card."]
4136    STORAGE_TYPE_MICROSD = 3,
4137    #[doc = "Storage type is CFast."]
4138    STORAGE_TYPE_CF = 4,
4139    #[doc = "Storage type is CFexpress."]
4140    STORAGE_TYPE_CFE = 5,
4141    #[doc = "Storage type is XQD."]
4142    STORAGE_TYPE_XQD = 6,
4143    #[doc = "Storage type is HD mass storage type."]
4144    STORAGE_TYPE_HD = 7,
4145    #[doc = "Storage type is other, not listed type."]
4146    STORAGE_TYPE_OTHER = 254,
4147}
4148impl StorageType {
4149    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4150}
4151impl Default for StorageType {
4152    fn default() -> Self {
4153        Self::DEFAULT
4154    }
4155}
4156bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4157impl StorageUsageFlag {
4158    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4159}
4160impl Default for StorageUsageFlag {
4161    fn default() -> Self {
4162        Self::DEFAULT
4163    }
4164}
4165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4167#[cfg_attr(feature = "serde", serde(tag = "type"))]
4168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4169#[repr(u32)]
4170#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4171pub enum TuneFormat {
4172    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4173    TUNE_FORMAT_QBASIC1_1 = 1,
4174    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4175    TUNE_FORMAT_MML_MODERN = 2,
4176}
4177impl TuneFormat {
4178    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4179}
4180impl Default for TuneFormat {
4181    fn default() -> Self {
4182        Self::DEFAULT
4183    }
4184}
4185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4187#[cfg_attr(feature = "serde", serde(tag = "type"))]
4188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4189#[repr(u32)]
4190#[doc = "Generalized UAVCAN node health"]
4191pub enum UavcanNodeHealth {
4192    #[doc = "The node is functioning properly."]
4193    UAVCAN_NODE_HEALTH_OK = 0,
4194    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4195    UAVCAN_NODE_HEALTH_WARNING = 1,
4196    #[doc = "The node has encountered a major failure."]
4197    UAVCAN_NODE_HEALTH_ERROR = 2,
4198    #[doc = "The node has suffered a fatal malfunction."]
4199    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4200}
4201impl UavcanNodeHealth {
4202    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4203}
4204impl Default for UavcanNodeHealth {
4205    fn default() -> Self {
4206        Self::DEFAULT
4207    }
4208}
4209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4211#[cfg_attr(feature = "serde", serde(tag = "type"))]
4212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4213#[repr(u32)]
4214#[doc = "Generalized UAVCAN node mode"]
4215pub enum UavcanNodeMode {
4216    #[doc = "The node is performing its primary functions."]
4217    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4218    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4219    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4220    #[doc = "The node is under maintenance."]
4221    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4222    #[doc = "The node is in the process of updating its software."]
4223    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4224    #[doc = "The node is no longer available online."]
4225    UAVCAN_NODE_MODE_OFFLINE = 7,
4226}
4227impl UavcanNodeMode {
4228    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4229}
4230impl Default for UavcanNodeMode {
4231    fn default() -> Self {
4232        Self::DEFAULT
4233    }
4234}
4235bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4236impl UtmDataAvailFlags {
4237    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4238}
4239impl Default for UtmDataAvailFlags {
4240    fn default() -> Self {
4241        Self::DEFAULT
4242    }
4243}
4244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4246#[cfg_attr(feature = "serde", serde(tag = "type"))]
4247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4248#[repr(u32)]
4249#[doc = "Airborne status of UAS."]
4250pub enum UtmFlightState {
4251    #[doc = "The flight state can't be determined."]
4252    UTM_FLIGHT_STATE_UNKNOWN = 1,
4253    #[doc = "UAS on ground."]
4254    UTM_FLIGHT_STATE_GROUND = 2,
4255    #[doc = "UAS airborne."]
4256    UTM_FLIGHT_STATE_AIRBORNE = 3,
4257    #[doc = "UAS is in an emergency flight state."]
4258    UTM_FLIGHT_STATE_EMERGENCY = 16,
4259    #[doc = "UAS has no active controls."]
4260    UTM_FLIGHT_STATE_NOCTRL = 32,
4261}
4262impl UtmFlightState {
4263    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4264}
4265impl Default for UtmFlightState {
4266    fn default() -> Self {
4267        Self::DEFAULT
4268    }
4269}
4270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4272#[cfg_attr(feature = "serde", serde(tag = "type"))]
4273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4274#[repr(u32)]
4275#[doc = "Video stream encodings"]
4276pub enum VideoStreamEncoding {
4277    #[doc = "Stream encoding is unknown"]
4278    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4279    #[doc = "Stream encoding is H.264"]
4280    VIDEO_STREAM_ENCODING_H264 = 1,
4281    #[doc = "Stream encoding is H.265"]
4282    VIDEO_STREAM_ENCODING_H265 = 2,
4283}
4284impl VideoStreamEncoding {
4285    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4286}
4287impl Default for VideoStreamEncoding {
4288    fn default() -> Self {
4289        Self::DEFAULT
4290    }
4291}
4292bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4293impl VideoStreamStatusFlags {
4294    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4295}
4296impl Default for VideoStreamStatusFlags {
4297    fn default() -> Self {
4298        Self::DEFAULT
4299    }
4300}
4301#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4303#[cfg_attr(feature = "serde", serde(tag = "type"))]
4304#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4305#[repr(u32)]
4306#[doc = "Video stream types"]
4307pub enum VideoStreamType {
4308    #[doc = "Stream is RTSP"]
4309    VIDEO_STREAM_TYPE_RTSP = 0,
4310    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4311    VIDEO_STREAM_TYPE_RTPUDP = 1,
4312    #[doc = "Stream is MPEG on TCP"]
4313    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4314    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4315    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4316}
4317impl VideoStreamType {
4318    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4319}
4320impl Default for VideoStreamType {
4321    fn default() -> Self {
4322        Self::DEFAULT
4323    }
4324}
4325#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4327#[cfg_attr(feature = "serde", serde(tag = "type"))]
4328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4329#[repr(u32)]
4330#[doc = "Direction of VTOL transition"]
4331pub enum VtolTransitionHeading {
4332    #[doc = "Respect the heading configuration of the vehicle."]
4333    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4334    #[doc = "Use the heading pointing towards the next waypoint."]
4335    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4336    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4337    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4338    #[doc = "Use the specified heading in parameter 4."]
4339    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4340    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4341    VTOL_TRANSITION_HEADING_ANY = 4,
4342}
4343impl VtolTransitionHeading {
4344    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4345}
4346impl Default for VtolTransitionHeading {
4347    fn default() -> Self {
4348        Self::DEFAULT
4349    }
4350}
4351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4353#[cfg_attr(feature = "serde", serde(tag = "type"))]
4354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4355#[repr(u32)]
4356#[doc = "WiFi Mode."]
4357pub enum WifiConfigApMode {
4358    #[doc = "WiFi mode is undefined."]
4359    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4360    #[doc = "WiFi configured as an access point."]
4361    WIFI_CONFIG_AP_MODE_AP = 1,
4362    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4363    WIFI_CONFIG_AP_MODE_STATION = 2,
4364    #[doc = "WiFi disabled."]
4365    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4366}
4367impl WifiConfigApMode {
4368    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4369}
4370impl Default for WifiConfigApMode {
4371    fn default() -> Self {
4372        Self::DEFAULT
4373    }
4374}
4375#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4376#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4377#[cfg_attr(feature = "serde", serde(tag = "type"))]
4378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4379#[repr(u32)]
4380#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4381pub enum WifiConfigApResponse {
4382    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4383    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4384    #[doc = "Changes accepted."]
4385    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4386    #[doc = "Changes rejected."]
4387    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4388    #[doc = "Invalid Mode."]
4389    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4390    #[doc = "Invalid SSID."]
4391    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4392    #[doc = "Invalid Password."]
4393    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4394}
4395impl WifiConfigApResponse {
4396    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4397}
4398impl Default for WifiConfigApResponse {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4405#[cfg_attr(feature = "serde", serde(tag = "type"))]
4406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4407#[repr(u32)]
4408#[doc = "Winch actions."]
4409pub enum WinchActions {
4410    #[doc = "Allow motor to freewheel."]
4411    WINCH_RELAXED = 0,
4412    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4413    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4414    #[doc = "Wind or unwind line at specified rate."]
4415    WINCH_RATE_CONTROL = 2,
4416    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4417    WINCH_LOCK = 3,
4418    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4419    WINCH_DELIVER = 4,
4420    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4421    WINCH_HOLD = 5,
4422    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4423    WINCH_RETRACT = 6,
4424    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4425    WINCH_LOAD_LINE = 7,
4426    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4427    WINCH_ABANDON_LINE = 8,
4428    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4429    WINCH_LOAD_PAYLOAD = 9,
4430}
4431impl WinchActions {
4432    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4433}
4434impl Default for WinchActions {
4435    fn default() -> Self {
4436        Self::DEFAULT
4437    }
4438}
4439#[doc = "id: 140"]
4440#[doc = "Set the vehicle attitude and body angular rates."]
4441#[derive(Debug, Clone, PartialEq)]
4442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4443#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4444pub struct ACTUATOR_CONTROL_TARGET_DATA {
4445    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4446    pub time_usec: u64,
4447    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4449    pub controls: [f32; 8],
4450    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4451    pub group_mlx: u8,
4452}
4453impl ACTUATOR_CONTROL_TARGET_DATA {
4454    pub const ENCODED_LEN: usize = 41usize;
4455    pub const DEFAULT: Self = Self {
4456        time_usec: 0_u64,
4457        controls: [0.0_f32; 8usize],
4458        group_mlx: 0_u8,
4459    };
4460    #[cfg(feature = "arbitrary")]
4461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4462        use arbitrary::{Arbitrary, Unstructured};
4463        let mut buf = [0u8; 1024];
4464        rng.fill_bytes(&mut buf);
4465        let mut unstructured = Unstructured::new(&buf);
4466        Self::arbitrary(&mut unstructured).unwrap_or_default()
4467    }
4468}
4469impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4470    fn default() -> Self {
4471        Self::DEFAULT.clone()
4472    }
4473}
4474impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4475    type Message = MavMessage;
4476    const ID: u32 = 140u32;
4477    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4478    const EXTRA_CRC: u8 = 181u8;
4479    const ENCODED_LEN: usize = 41usize;
4480    fn deser(
4481        _version: MavlinkVersion,
4482        __input: &[u8],
4483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4484        let avail_len = __input.len();
4485        let mut payload_buf = [0; Self::ENCODED_LEN];
4486        let mut buf = if avail_len < Self::ENCODED_LEN {
4487            payload_buf[0..avail_len].copy_from_slice(__input);
4488            Bytes::new(&payload_buf)
4489        } else {
4490            Bytes::new(__input)
4491        };
4492        let mut __struct = Self::default();
4493        __struct.time_usec = buf.get_u64_le();
4494        for v in &mut __struct.controls {
4495            let val = buf.get_f32_le();
4496            *v = val;
4497        }
4498        __struct.group_mlx = buf.get_u8();
4499        Ok(__struct)
4500    }
4501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4502        let mut __tmp = BytesMut::new(bytes);
4503        #[allow(clippy::absurd_extreme_comparisons)]
4504        #[allow(unused_comparisons)]
4505        if __tmp.remaining() < Self::ENCODED_LEN {
4506            panic!(
4507                "buffer is too small (need {} bytes, but got {})",
4508                Self::ENCODED_LEN,
4509                __tmp.remaining(),
4510            )
4511        }
4512        __tmp.put_u64_le(self.time_usec);
4513        for val in &self.controls {
4514            __tmp.put_f32_le(*val);
4515        }
4516        __tmp.put_u8(self.group_mlx);
4517        if matches!(version, MavlinkVersion::V2) {
4518            let len = __tmp.len();
4519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4520        } else {
4521            __tmp.len()
4522        }
4523    }
4524}
4525#[doc = "id: 375"]
4526#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4527#[derive(Debug, Clone, PartialEq)]
4528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4530pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4531    #[doc = "Timestamp (since system boot)."]
4532    pub time_usec: u64,
4533    #[doc = "Active outputs"]
4534    pub active: u32,
4535    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4536    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4537    pub actuator: [f32; 32],
4538}
4539impl ACTUATOR_OUTPUT_STATUS_DATA {
4540    pub const ENCODED_LEN: usize = 140usize;
4541    pub const DEFAULT: Self = Self {
4542        time_usec: 0_u64,
4543        active: 0_u32,
4544        actuator: [0.0_f32; 32usize],
4545    };
4546    #[cfg(feature = "arbitrary")]
4547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4548        use arbitrary::{Arbitrary, Unstructured};
4549        let mut buf = [0u8; 1024];
4550        rng.fill_bytes(&mut buf);
4551        let mut unstructured = Unstructured::new(&buf);
4552        Self::arbitrary(&mut unstructured).unwrap_or_default()
4553    }
4554}
4555impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4556    fn default() -> Self {
4557        Self::DEFAULT.clone()
4558    }
4559}
4560impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4561    type Message = MavMessage;
4562    const ID: u32 = 375u32;
4563    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4564    const EXTRA_CRC: u8 = 251u8;
4565    const ENCODED_LEN: usize = 140usize;
4566    fn deser(
4567        _version: MavlinkVersion,
4568        __input: &[u8],
4569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4570        let avail_len = __input.len();
4571        let mut payload_buf = [0; Self::ENCODED_LEN];
4572        let mut buf = if avail_len < Self::ENCODED_LEN {
4573            payload_buf[0..avail_len].copy_from_slice(__input);
4574            Bytes::new(&payload_buf)
4575        } else {
4576            Bytes::new(__input)
4577        };
4578        let mut __struct = Self::default();
4579        __struct.time_usec = buf.get_u64_le();
4580        __struct.active = buf.get_u32_le();
4581        for v in &mut __struct.actuator {
4582            let val = buf.get_f32_le();
4583            *v = val;
4584        }
4585        Ok(__struct)
4586    }
4587    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4588        let mut __tmp = BytesMut::new(bytes);
4589        #[allow(clippy::absurd_extreme_comparisons)]
4590        #[allow(unused_comparisons)]
4591        if __tmp.remaining() < Self::ENCODED_LEN {
4592            panic!(
4593                "buffer is too small (need {} bytes, but got {})",
4594                Self::ENCODED_LEN,
4595                __tmp.remaining(),
4596            )
4597        }
4598        __tmp.put_u64_le(self.time_usec);
4599        __tmp.put_u32_le(self.active);
4600        for val in &self.actuator {
4601            __tmp.put_f32_le(*val);
4602        }
4603        if matches!(version, MavlinkVersion::V2) {
4604            let len = __tmp.len();
4605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4606        } else {
4607            __tmp.len()
4608        }
4609    }
4610}
4611#[doc = "id: 246"]
4612#[doc = "The location and information of an ADSB vehicle."]
4613#[derive(Debug, Clone, PartialEq)]
4614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4616pub struct ADSB_VEHICLE_DATA {
4617    #[doc = "ICAO address"]
4618    pub ICAO_address: u32,
4619    #[doc = "Latitude"]
4620    pub lat: i32,
4621    #[doc = "Longitude"]
4622    pub lon: i32,
4623    #[doc = "Altitude(ASL)"]
4624    pub altitude: i32,
4625    #[doc = "Course over ground"]
4626    pub heading: u16,
4627    #[doc = "The horizontal velocity"]
4628    pub hor_velocity: u16,
4629    #[doc = "The vertical velocity. Positive is up"]
4630    pub ver_velocity: i16,
4631    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4632    pub flags: AdsbFlags,
4633    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4634    pub squawk: u16,
4635    #[doc = "ADSB altitude type."]
4636    pub altitude_type: AdsbAltitudeType,
4637    #[doc = "The callsign, 8+null"]
4638    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4639    pub callsign: [u8; 9],
4640    #[doc = "ADSB emitter type."]
4641    pub emitter_type: AdsbEmitterType,
4642    #[doc = "Time since last communication in seconds"]
4643    pub tslc: u8,
4644}
4645impl ADSB_VEHICLE_DATA {
4646    pub const ENCODED_LEN: usize = 38usize;
4647    pub const DEFAULT: Self = Self {
4648        ICAO_address: 0_u32,
4649        lat: 0_i32,
4650        lon: 0_i32,
4651        altitude: 0_i32,
4652        heading: 0_u16,
4653        hor_velocity: 0_u16,
4654        ver_velocity: 0_i16,
4655        flags: AdsbFlags::DEFAULT,
4656        squawk: 0_u16,
4657        altitude_type: AdsbAltitudeType::DEFAULT,
4658        callsign: [0_u8; 9usize],
4659        emitter_type: AdsbEmitterType::DEFAULT,
4660        tslc: 0_u8,
4661    };
4662    #[cfg(feature = "arbitrary")]
4663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4664        use arbitrary::{Arbitrary, Unstructured};
4665        let mut buf = [0u8; 1024];
4666        rng.fill_bytes(&mut buf);
4667        let mut unstructured = Unstructured::new(&buf);
4668        Self::arbitrary(&mut unstructured).unwrap_or_default()
4669    }
4670}
4671impl Default for ADSB_VEHICLE_DATA {
4672    fn default() -> Self {
4673        Self::DEFAULT.clone()
4674    }
4675}
4676impl MessageData for ADSB_VEHICLE_DATA {
4677    type Message = MavMessage;
4678    const ID: u32 = 246u32;
4679    const NAME: &'static str = "ADSB_VEHICLE";
4680    const EXTRA_CRC: u8 = 184u8;
4681    const ENCODED_LEN: usize = 38usize;
4682    fn deser(
4683        _version: MavlinkVersion,
4684        __input: &[u8],
4685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4686        let avail_len = __input.len();
4687        let mut payload_buf = [0; Self::ENCODED_LEN];
4688        let mut buf = if avail_len < Self::ENCODED_LEN {
4689            payload_buf[0..avail_len].copy_from_slice(__input);
4690            Bytes::new(&payload_buf)
4691        } else {
4692            Bytes::new(__input)
4693        };
4694        let mut __struct = Self::default();
4695        __struct.ICAO_address = buf.get_u32_le();
4696        __struct.lat = buf.get_i32_le();
4697        __struct.lon = buf.get_i32_le();
4698        __struct.altitude = buf.get_i32_le();
4699        __struct.heading = buf.get_u16_le();
4700        __struct.hor_velocity = buf.get_u16_le();
4701        __struct.ver_velocity = buf.get_i16_le();
4702        let tmp = buf.get_u16_le();
4703        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4704            ::mavlink_core::error::ParserError::InvalidFlag {
4705                flag_type: "AdsbFlags",
4706                value: tmp as u32,
4707            },
4708        )?;
4709        __struct.squawk = buf.get_u16_le();
4710        let tmp = buf.get_u8();
4711        __struct.altitude_type =
4712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4713                enum_type: "AdsbAltitudeType",
4714                value: tmp as u32,
4715            })?;
4716        for v in &mut __struct.callsign {
4717            let val = buf.get_u8();
4718            *v = val;
4719        }
4720        let tmp = buf.get_u8();
4721        __struct.emitter_type =
4722            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4723                enum_type: "AdsbEmitterType",
4724                value: tmp as u32,
4725            })?;
4726        __struct.tslc = buf.get_u8();
4727        Ok(__struct)
4728    }
4729    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4730        let mut __tmp = BytesMut::new(bytes);
4731        #[allow(clippy::absurd_extreme_comparisons)]
4732        #[allow(unused_comparisons)]
4733        if __tmp.remaining() < Self::ENCODED_LEN {
4734            panic!(
4735                "buffer is too small (need {} bytes, but got {})",
4736                Self::ENCODED_LEN,
4737                __tmp.remaining(),
4738            )
4739        }
4740        __tmp.put_u32_le(self.ICAO_address);
4741        __tmp.put_i32_le(self.lat);
4742        __tmp.put_i32_le(self.lon);
4743        __tmp.put_i32_le(self.altitude);
4744        __tmp.put_u16_le(self.heading);
4745        __tmp.put_u16_le(self.hor_velocity);
4746        __tmp.put_i16_le(self.ver_velocity);
4747        __tmp.put_u16_le(self.flags.bits());
4748        __tmp.put_u16_le(self.squawk);
4749        __tmp.put_u8(self.altitude_type as u8);
4750        for val in &self.callsign {
4751            __tmp.put_u8(*val);
4752        }
4753        __tmp.put_u8(self.emitter_type as u8);
4754        __tmp.put_u8(self.tslc);
4755        if matches!(version, MavlinkVersion::V2) {
4756            let len = __tmp.len();
4757            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4758        } else {
4759            __tmp.len()
4760        }
4761    }
4762}
4763#[doc = "id: 301"]
4764#[doc = "The location and information of an AIS vessel."]
4765#[derive(Debug, Clone, PartialEq)]
4766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4768pub struct AIS_VESSEL_DATA {
4769    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4770    pub MMSI: u32,
4771    #[doc = "Latitude"]
4772    pub lat: i32,
4773    #[doc = "Longitude"]
4774    pub lon: i32,
4775    #[doc = "Course over ground"]
4776    pub COG: u16,
4777    #[doc = "True heading"]
4778    pub heading: u16,
4779    #[doc = "Speed over ground"]
4780    pub velocity: u16,
4781    #[doc = "Distance from lat/lon location to bow"]
4782    pub dimension_bow: u16,
4783    #[doc = "Distance from lat/lon location to stern"]
4784    pub dimension_stern: u16,
4785    #[doc = "Time since last communication in seconds"]
4786    pub tslc: u16,
4787    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4788    pub flags: AisFlags,
4789    #[doc = "Turn rate"]
4790    pub turn_rate: i8,
4791    #[doc = "Navigational status"]
4792    pub navigational_status: AisNavStatus,
4793    #[doc = "Type of vessels"]
4794    pub mavtype: AisType,
4795    #[doc = "Distance from lat/lon location to port side"]
4796    pub dimension_port: u8,
4797    #[doc = "Distance from lat/lon location to starboard side"]
4798    pub dimension_starboard: u8,
4799    #[doc = "The vessel callsign"]
4800    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4801    pub callsign: [u8; 7],
4802    #[doc = "The vessel name"]
4803    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4804    pub name: [u8; 20],
4805}
4806impl AIS_VESSEL_DATA {
4807    pub const ENCODED_LEN: usize = 58usize;
4808    pub const DEFAULT: Self = Self {
4809        MMSI: 0_u32,
4810        lat: 0_i32,
4811        lon: 0_i32,
4812        COG: 0_u16,
4813        heading: 0_u16,
4814        velocity: 0_u16,
4815        dimension_bow: 0_u16,
4816        dimension_stern: 0_u16,
4817        tslc: 0_u16,
4818        flags: AisFlags::DEFAULT,
4819        turn_rate: 0_i8,
4820        navigational_status: AisNavStatus::DEFAULT,
4821        mavtype: AisType::DEFAULT,
4822        dimension_port: 0_u8,
4823        dimension_starboard: 0_u8,
4824        callsign: [0_u8; 7usize],
4825        name: [0_u8; 20usize],
4826    };
4827    #[cfg(feature = "arbitrary")]
4828    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4829        use arbitrary::{Arbitrary, Unstructured};
4830        let mut buf = [0u8; 1024];
4831        rng.fill_bytes(&mut buf);
4832        let mut unstructured = Unstructured::new(&buf);
4833        Self::arbitrary(&mut unstructured).unwrap_or_default()
4834    }
4835}
4836impl Default for AIS_VESSEL_DATA {
4837    fn default() -> Self {
4838        Self::DEFAULT.clone()
4839    }
4840}
4841impl MessageData for AIS_VESSEL_DATA {
4842    type Message = MavMessage;
4843    const ID: u32 = 301u32;
4844    const NAME: &'static str = "AIS_VESSEL";
4845    const EXTRA_CRC: u8 = 243u8;
4846    const ENCODED_LEN: usize = 58usize;
4847    fn deser(
4848        _version: MavlinkVersion,
4849        __input: &[u8],
4850    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4851        let avail_len = __input.len();
4852        let mut payload_buf = [0; Self::ENCODED_LEN];
4853        let mut buf = if avail_len < Self::ENCODED_LEN {
4854            payload_buf[0..avail_len].copy_from_slice(__input);
4855            Bytes::new(&payload_buf)
4856        } else {
4857            Bytes::new(__input)
4858        };
4859        let mut __struct = Self::default();
4860        __struct.MMSI = buf.get_u32_le();
4861        __struct.lat = buf.get_i32_le();
4862        __struct.lon = buf.get_i32_le();
4863        __struct.COG = buf.get_u16_le();
4864        __struct.heading = buf.get_u16_le();
4865        __struct.velocity = buf.get_u16_le();
4866        __struct.dimension_bow = buf.get_u16_le();
4867        __struct.dimension_stern = buf.get_u16_le();
4868        __struct.tslc = buf.get_u16_le();
4869        let tmp = buf.get_u16_le();
4870        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
4871            ::mavlink_core::error::ParserError::InvalidFlag {
4872                flag_type: "AisFlags",
4873                value: tmp as u32,
4874            },
4875        )?;
4876        __struct.turn_rate = buf.get_i8();
4877        let tmp = buf.get_u8();
4878        __struct.navigational_status =
4879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4880                enum_type: "AisNavStatus",
4881                value: tmp as u32,
4882            })?;
4883        let tmp = buf.get_u8();
4884        __struct.mavtype =
4885            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4886                enum_type: "AisType",
4887                value: tmp as u32,
4888            })?;
4889        __struct.dimension_port = buf.get_u8();
4890        __struct.dimension_starboard = buf.get_u8();
4891        for v in &mut __struct.callsign {
4892            let val = buf.get_u8();
4893            *v = val;
4894        }
4895        for v in &mut __struct.name {
4896            let val = buf.get_u8();
4897            *v = val;
4898        }
4899        Ok(__struct)
4900    }
4901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4902        let mut __tmp = BytesMut::new(bytes);
4903        #[allow(clippy::absurd_extreme_comparisons)]
4904        #[allow(unused_comparisons)]
4905        if __tmp.remaining() < Self::ENCODED_LEN {
4906            panic!(
4907                "buffer is too small (need {} bytes, but got {})",
4908                Self::ENCODED_LEN,
4909                __tmp.remaining(),
4910            )
4911        }
4912        __tmp.put_u32_le(self.MMSI);
4913        __tmp.put_i32_le(self.lat);
4914        __tmp.put_i32_le(self.lon);
4915        __tmp.put_u16_le(self.COG);
4916        __tmp.put_u16_le(self.heading);
4917        __tmp.put_u16_le(self.velocity);
4918        __tmp.put_u16_le(self.dimension_bow);
4919        __tmp.put_u16_le(self.dimension_stern);
4920        __tmp.put_u16_le(self.tslc);
4921        __tmp.put_u16_le(self.flags.bits());
4922        __tmp.put_i8(self.turn_rate);
4923        __tmp.put_u8(self.navigational_status as u8);
4924        __tmp.put_u8(self.mavtype as u8);
4925        __tmp.put_u8(self.dimension_port);
4926        __tmp.put_u8(self.dimension_starboard);
4927        for val in &self.callsign {
4928            __tmp.put_u8(*val);
4929        }
4930        for val in &self.name {
4931            __tmp.put_u8(*val);
4932        }
4933        if matches!(version, MavlinkVersion::V2) {
4934            let len = __tmp.len();
4935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4936        } else {
4937            __tmp.len()
4938        }
4939    }
4940}
4941#[doc = "id: 141"]
4942#[doc = "The current system altitude."]
4943#[derive(Debug, Clone, PartialEq)]
4944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4946pub struct ALTITUDE_DATA {
4947    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4948    pub time_usec: u64,
4949    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
4950    pub altitude_monotonic: f32,
4951    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
4952    pub altitude_amsl: f32,
4953    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
4954    pub altitude_local: f32,
4955    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
4956    pub altitude_relative: f32,
4957    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
4958    pub altitude_terrain: f32,
4959    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
4960    pub bottom_clearance: f32,
4961}
4962impl ALTITUDE_DATA {
4963    pub const ENCODED_LEN: usize = 32usize;
4964    pub const DEFAULT: Self = Self {
4965        time_usec: 0_u64,
4966        altitude_monotonic: 0.0_f32,
4967        altitude_amsl: 0.0_f32,
4968        altitude_local: 0.0_f32,
4969        altitude_relative: 0.0_f32,
4970        altitude_terrain: 0.0_f32,
4971        bottom_clearance: 0.0_f32,
4972    };
4973    #[cfg(feature = "arbitrary")]
4974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4975        use arbitrary::{Arbitrary, Unstructured};
4976        let mut buf = [0u8; 1024];
4977        rng.fill_bytes(&mut buf);
4978        let mut unstructured = Unstructured::new(&buf);
4979        Self::arbitrary(&mut unstructured).unwrap_or_default()
4980    }
4981}
4982impl Default for ALTITUDE_DATA {
4983    fn default() -> Self {
4984        Self::DEFAULT.clone()
4985    }
4986}
4987impl MessageData for ALTITUDE_DATA {
4988    type Message = MavMessage;
4989    const ID: u32 = 141u32;
4990    const NAME: &'static str = "ALTITUDE";
4991    const EXTRA_CRC: u8 = 47u8;
4992    const ENCODED_LEN: usize = 32usize;
4993    fn deser(
4994        _version: MavlinkVersion,
4995        __input: &[u8],
4996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4997        let avail_len = __input.len();
4998        let mut payload_buf = [0; Self::ENCODED_LEN];
4999        let mut buf = if avail_len < Self::ENCODED_LEN {
5000            payload_buf[0..avail_len].copy_from_slice(__input);
5001            Bytes::new(&payload_buf)
5002        } else {
5003            Bytes::new(__input)
5004        };
5005        let mut __struct = Self::default();
5006        __struct.time_usec = buf.get_u64_le();
5007        __struct.altitude_monotonic = buf.get_f32_le();
5008        __struct.altitude_amsl = buf.get_f32_le();
5009        __struct.altitude_local = buf.get_f32_le();
5010        __struct.altitude_relative = buf.get_f32_le();
5011        __struct.altitude_terrain = buf.get_f32_le();
5012        __struct.bottom_clearance = buf.get_f32_le();
5013        Ok(__struct)
5014    }
5015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5016        let mut __tmp = BytesMut::new(bytes);
5017        #[allow(clippy::absurd_extreme_comparisons)]
5018        #[allow(unused_comparisons)]
5019        if __tmp.remaining() < Self::ENCODED_LEN {
5020            panic!(
5021                "buffer is too small (need {} bytes, but got {})",
5022                Self::ENCODED_LEN,
5023                __tmp.remaining(),
5024            )
5025        }
5026        __tmp.put_u64_le(self.time_usec);
5027        __tmp.put_f32_le(self.altitude_monotonic);
5028        __tmp.put_f32_le(self.altitude_amsl);
5029        __tmp.put_f32_le(self.altitude_local);
5030        __tmp.put_f32_le(self.altitude_relative);
5031        __tmp.put_f32_le(self.altitude_terrain);
5032        __tmp.put_f32_le(self.bottom_clearance);
5033        if matches!(version, MavlinkVersion::V2) {
5034            let len = __tmp.len();
5035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5036        } else {
5037            __tmp.len()
5038        }
5039    }
5040}
5041#[doc = "id: 17150"]
5042#[doc = "Array test #0."]
5043#[derive(Debug, Clone, PartialEq)]
5044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5046pub struct ARRAY_TEST_0_DATA {
5047    #[doc = "Value array"]
5048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5049    pub ar_u32: [u32; 4],
5050    #[doc = "Value array"]
5051    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5052    pub ar_u16: [u16; 4],
5053    #[doc = "Stub field"]
5054    pub v1: u8,
5055    #[doc = "Value array"]
5056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5057    pub ar_i8: [i8; 4],
5058    #[doc = "Value array"]
5059    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5060    pub ar_u8: [u8; 4],
5061}
5062impl ARRAY_TEST_0_DATA {
5063    pub const ENCODED_LEN: usize = 33usize;
5064    pub const DEFAULT: Self = Self {
5065        ar_u32: [0_u32; 4usize],
5066        ar_u16: [0_u16; 4usize],
5067        v1: 0_u8,
5068        ar_i8: [0_i8; 4usize],
5069        ar_u8: [0_u8; 4usize],
5070    };
5071    #[cfg(feature = "arbitrary")]
5072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5073        use arbitrary::{Arbitrary, Unstructured};
5074        let mut buf = [0u8; 1024];
5075        rng.fill_bytes(&mut buf);
5076        let mut unstructured = Unstructured::new(&buf);
5077        Self::arbitrary(&mut unstructured).unwrap_or_default()
5078    }
5079}
5080impl Default for ARRAY_TEST_0_DATA {
5081    fn default() -> Self {
5082        Self::DEFAULT.clone()
5083    }
5084}
5085impl MessageData for ARRAY_TEST_0_DATA {
5086    type Message = MavMessage;
5087    const ID: u32 = 17150u32;
5088    const NAME: &'static str = "ARRAY_TEST_0";
5089    const EXTRA_CRC: u8 = 26u8;
5090    const ENCODED_LEN: usize = 33usize;
5091    fn deser(
5092        _version: MavlinkVersion,
5093        __input: &[u8],
5094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5095        let avail_len = __input.len();
5096        let mut payload_buf = [0; Self::ENCODED_LEN];
5097        let mut buf = if avail_len < Self::ENCODED_LEN {
5098            payload_buf[0..avail_len].copy_from_slice(__input);
5099            Bytes::new(&payload_buf)
5100        } else {
5101            Bytes::new(__input)
5102        };
5103        let mut __struct = Self::default();
5104        for v in &mut __struct.ar_u32 {
5105            let val = buf.get_u32_le();
5106            *v = val;
5107        }
5108        for v in &mut __struct.ar_u16 {
5109            let val = buf.get_u16_le();
5110            *v = val;
5111        }
5112        __struct.v1 = buf.get_u8();
5113        for v in &mut __struct.ar_i8 {
5114            let val = buf.get_i8();
5115            *v = val;
5116        }
5117        for v in &mut __struct.ar_u8 {
5118            let val = buf.get_u8();
5119            *v = val;
5120        }
5121        Ok(__struct)
5122    }
5123    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5124        let mut __tmp = BytesMut::new(bytes);
5125        #[allow(clippy::absurd_extreme_comparisons)]
5126        #[allow(unused_comparisons)]
5127        if __tmp.remaining() < Self::ENCODED_LEN {
5128            panic!(
5129                "buffer is too small (need {} bytes, but got {})",
5130                Self::ENCODED_LEN,
5131                __tmp.remaining(),
5132            )
5133        }
5134        for val in &self.ar_u32 {
5135            __tmp.put_u32_le(*val);
5136        }
5137        for val in &self.ar_u16 {
5138            __tmp.put_u16_le(*val);
5139        }
5140        __tmp.put_u8(self.v1);
5141        for val in &self.ar_i8 {
5142            __tmp.put_i8(*val);
5143        }
5144        for val in &self.ar_u8 {
5145            __tmp.put_u8(*val);
5146        }
5147        if matches!(version, MavlinkVersion::V2) {
5148            let len = __tmp.len();
5149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5150        } else {
5151            __tmp.len()
5152        }
5153    }
5154}
5155#[doc = "id: 17151"]
5156#[doc = "Array test #1."]
5157#[derive(Debug, Clone, PartialEq)]
5158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5160pub struct ARRAY_TEST_1_DATA {
5161    #[doc = "Value array"]
5162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5163    pub ar_u32: [u32; 4],
5164}
5165impl ARRAY_TEST_1_DATA {
5166    pub const ENCODED_LEN: usize = 16usize;
5167    pub const DEFAULT: Self = Self {
5168        ar_u32: [0_u32; 4usize],
5169    };
5170    #[cfg(feature = "arbitrary")]
5171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5172        use arbitrary::{Arbitrary, Unstructured};
5173        let mut buf = [0u8; 1024];
5174        rng.fill_bytes(&mut buf);
5175        let mut unstructured = Unstructured::new(&buf);
5176        Self::arbitrary(&mut unstructured).unwrap_or_default()
5177    }
5178}
5179impl Default for ARRAY_TEST_1_DATA {
5180    fn default() -> Self {
5181        Self::DEFAULT.clone()
5182    }
5183}
5184impl MessageData for ARRAY_TEST_1_DATA {
5185    type Message = MavMessage;
5186    const ID: u32 = 17151u32;
5187    const NAME: &'static str = "ARRAY_TEST_1";
5188    const EXTRA_CRC: u8 = 72u8;
5189    const ENCODED_LEN: usize = 16usize;
5190    fn deser(
5191        _version: MavlinkVersion,
5192        __input: &[u8],
5193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5194        let avail_len = __input.len();
5195        let mut payload_buf = [0; Self::ENCODED_LEN];
5196        let mut buf = if avail_len < Self::ENCODED_LEN {
5197            payload_buf[0..avail_len].copy_from_slice(__input);
5198            Bytes::new(&payload_buf)
5199        } else {
5200            Bytes::new(__input)
5201        };
5202        let mut __struct = Self::default();
5203        for v in &mut __struct.ar_u32 {
5204            let val = buf.get_u32_le();
5205            *v = val;
5206        }
5207        Ok(__struct)
5208    }
5209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5210        let mut __tmp = BytesMut::new(bytes);
5211        #[allow(clippy::absurd_extreme_comparisons)]
5212        #[allow(unused_comparisons)]
5213        if __tmp.remaining() < Self::ENCODED_LEN {
5214            panic!(
5215                "buffer is too small (need {} bytes, but got {})",
5216                Self::ENCODED_LEN,
5217                __tmp.remaining(),
5218            )
5219        }
5220        for val in &self.ar_u32 {
5221            __tmp.put_u32_le(*val);
5222        }
5223        if matches!(version, MavlinkVersion::V2) {
5224            let len = __tmp.len();
5225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5226        } else {
5227            __tmp.len()
5228        }
5229    }
5230}
5231#[doc = "id: 17153"]
5232#[doc = "Array test #3."]
5233#[derive(Debug, Clone, PartialEq)]
5234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5236pub struct ARRAY_TEST_3_DATA {
5237    #[doc = "Value array"]
5238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5239    pub ar_u32: [u32; 4],
5240    #[doc = "Stub field"]
5241    pub v: u8,
5242}
5243impl ARRAY_TEST_3_DATA {
5244    pub const ENCODED_LEN: usize = 17usize;
5245    pub const DEFAULT: Self = Self {
5246        ar_u32: [0_u32; 4usize],
5247        v: 0_u8,
5248    };
5249    #[cfg(feature = "arbitrary")]
5250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5251        use arbitrary::{Arbitrary, Unstructured};
5252        let mut buf = [0u8; 1024];
5253        rng.fill_bytes(&mut buf);
5254        let mut unstructured = Unstructured::new(&buf);
5255        Self::arbitrary(&mut unstructured).unwrap_or_default()
5256    }
5257}
5258impl Default for ARRAY_TEST_3_DATA {
5259    fn default() -> Self {
5260        Self::DEFAULT.clone()
5261    }
5262}
5263impl MessageData for ARRAY_TEST_3_DATA {
5264    type Message = MavMessage;
5265    const ID: u32 = 17153u32;
5266    const NAME: &'static str = "ARRAY_TEST_3";
5267    const EXTRA_CRC: u8 = 19u8;
5268    const ENCODED_LEN: usize = 17usize;
5269    fn deser(
5270        _version: MavlinkVersion,
5271        __input: &[u8],
5272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5273        let avail_len = __input.len();
5274        let mut payload_buf = [0; Self::ENCODED_LEN];
5275        let mut buf = if avail_len < Self::ENCODED_LEN {
5276            payload_buf[0..avail_len].copy_from_slice(__input);
5277            Bytes::new(&payload_buf)
5278        } else {
5279            Bytes::new(__input)
5280        };
5281        let mut __struct = Self::default();
5282        for v in &mut __struct.ar_u32 {
5283            let val = buf.get_u32_le();
5284            *v = val;
5285        }
5286        __struct.v = buf.get_u8();
5287        Ok(__struct)
5288    }
5289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5290        let mut __tmp = BytesMut::new(bytes);
5291        #[allow(clippy::absurd_extreme_comparisons)]
5292        #[allow(unused_comparisons)]
5293        if __tmp.remaining() < Self::ENCODED_LEN {
5294            panic!(
5295                "buffer is too small (need {} bytes, but got {})",
5296                Self::ENCODED_LEN,
5297                __tmp.remaining(),
5298            )
5299        }
5300        for val in &self.ar_u32 {
5301            __tmp.put_u32_le(*val);
5302        }
5303        __tmp.put_u8(self.v);
5304        if matches!(version, MavlinkVersion::V2) {
5305            let len = __tmp.len();
5306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5307        } else {
5308            __tmp.len()
5309        }
5310    }
5311}
5312#[doc = "id: 17154"]
5313#[doc = "Array test #4."]
5314#[derive(Debug, Clone, PartialEq)]
5315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5317pub struct ARRAY_TEST_4_DATA {
5318    #[doc = "Value array"]
5319    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5320    pub ar_u32: [u32; 4],
5321    #[doc = "Stub field"]
5322    pub v: u8,
5323}
5324impl ARRAY_TEST_4_DATA {
5325    pub const ENCODED_LEN: usize = 17usize;
5326    pub const DEFAULT: Self = Self {
5327        ar_u32: [0_u32; 4usize],
5328        v: 0_u8,
5329    };
5330    #[cfg(feature = "arbitrary")]
5331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5332        use arbitrary::{Arbitrary, Unstructured};
5333        let mut buf = [0u8; 1024];
5334        rng.fill_bytes(&mut buf);
5335        let mut unstructured = Unstructured::new(&buf);
5336        Self::arbitrary(&mut unstructured).unwrap_or_default()
5337    }
5338}
5339impl Default for ARRAY_TEST_4_DATA {
5340    fn default() -> Self {
5341        Self::DEFAULT.clone()
5342    }
5343}
5344impl MessageData for ARRAY_TEST_4_DATA {
5345    type Message = MavMessage;
5346    const ID: u32 = 17154u32;
5347    const NAME: &'static str = "ARRAY_TEST_4";
5348    const EXTRA_CRC: u8 = 89u8;
5349    const ENCODED_LEN: usize = 17usize;
5350    fn deser(
5351        _version: MavlinkVersion,
5352        __input: &[u8],
5353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5354        let avail_len = __input.len();
5355        let mut payload_buf = [0; Self::ENCODED_LEN];
5356        let mut buf = if avail_len < Self::ENCODED_LEN {
5357            payload_buf[0..avail_len].copy_from_slice(__input);
5358            Bytes::new(&payload_buf)
5359        } else {
5360            Bytes::new(__input)
5361        };
5362        let mut __struct = Self::default();
5363        for v in &mut __struct.ar_u32 {
5364            let val = buf.get_u32_le();
5365            *v = val;
5366        }
5367        __struct.v = buf.get_u8();
5368        Ok(__struct)
5369    }
5370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5371        let mut __tmp = BytesMut::new(bytes);
5372        #[allow(clippy::absurd_extreme_comparisons)]
5373        #[allow(unused_comparisons)]
5374        if __tmp.remaining() < Self::ENCODED_LEN {
5375            panic!(
5376                "buffer is too small (need {} bytes, but got {})",
5377                Self::ENCODED_LEN,
5378                __tmp.remaining(),
5379            )
5380        }
5381        for val in &self.ar_u32 {
5382            __tmp.put_u32_le(*val);
5383        }
5384        __tmp.put_u8(self.v);
5385        if matches!(version, MavlinkVersion::V2) {
5386            let len = __tmp.len();
5387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5388        } else {
5389            __tmp.len()
5390        }
5391    }
5392}
5393#[doc = "id: 17155"]
5394#[doc = "Array test #5."]
5395#[derive(Debug, Clone, PartialEq)]
5396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5398pub struct ARRAY_TEST_5_DATA {
5399    #[doc = "Value array"]
5400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5401    pub c1: [u8; 5],
5402    #[doc = "Value array"]
5403    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5404    pub c2: [u8; 5],
5405}
5406impl ARRAY_TEST_5_DATA {
5407    pub const ENCODED_LEN: usize = 10usize;
5408    pub const DEFAULT: Self = Self {
5409        c1: [0_u8; 5usize],
5410        c2: [0_u8; 5usize],
5411    };
5412    #[cfg(feature = "arbitrary")]
5413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5414        use arbitrary::{Arbitrary, Unstructured};
5415        let mut buf = [0u8; 1024];
5416        rng.fill_bytes(&mut buf);
5417        let mut unstructured = Unstructured::new(&buf);
5418        Self::arbitrary(&mut unstructured).unwrap_or_default()
5419    }
5420}
5421impl Default for ARRAY_TEST_5_DATA {
5422    fn default() -> Self {
5423        Self::DEFAULT.clone()
5424    }
5425}
5426impl MessageData for ARRAY_TEST_5_DATA {
5427    type Message = MavMessage;
5428    const ID: u32 = 17155u32;
5429    const NAME: &'static str = "ARRAY_TEST_5";
5430    const EXTRA_CRC: u8 = 27u8;
5431    const ENCODED_LEN: usize = 10usize;
5432    fn deser(
5433        _version: MavlinkVersion,
5434        __input: &[u8],
5435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5436        let avail_len = __input.len();
5437        let mut payload_buf = [0; Self::ENCODED_LEN];
5438        let mut buf = if avail_len < Self::ENCODED_LEN {
5439            payload_buf[0..avail_len].copy_from_slice(__input);
5440            Bytes::new(&payload_buf)
5441        } else {
5442            Bytes::new(__input)
5443        };
5444        let mut __struct = Self::default();
5445        for v in &mut __struct.c1 {
5446            let val = buf.get_u8();
5447            *v = val;
5448        }
5449        for v in &mut __struct.c2 {
5450            let val = buf.get_u8();
5451            *v = val;
5452        }
5453        Ok(__struct)
5454    }
5455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5456        let mut __tmp = BytesMut::new(bytes);
5457        #[allow(clippy::absurd_extreme_comparisons)]
5458        #[allow(unused_comparisons)]
5459        if __tmp.remaining() < Self::ENCODED_LEN {
5460            panic!(
5461                "buffer is too small (need {} bytes, but got {})",
5462                Self::ENCODED_LEN,
5463                __tmp.remaining(),
5464            )
5465        }
5466        for val in &self.c1 {
5467            __tmp.put_u8(*val);
5468        }
5469        for val in &self.c2 {
5470            __tmp.put_u8(*val);
5471        }
5472        if matches!(version, MavlinkVersion::V2) {
5473            let len = __tmp.len();
5474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5475        } else {
5476            __tmp.len()
5477        }
5478    }
5479}
5480#[doc = "id: 17156"]
5481#[doc = "Array test #6."]
5482#[derive(Debug, Clone, PartialEq)]
5483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5485pub struct ARRAY_TEST_6_DATA {
5486    #[doc = "Value array"]
5487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5488    pub ar_d: [f64; 2],
5489    #[doc = "Stub field"]
5490    pub v3: u32,
5491    #[doc = "Value array"]
5492    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5493    pub ar_u32: [u32; 2],
5494    #[doc = "Value array"]
5495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5496    pub ar_i32: [i32; 2],
5497    #[doc = "Value array"]
5498    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5499    pub ar_f: [f32; 2],
5500    #[doc = "Stub field"]
5501    pub v2: u16,
5502    #[doc = "Value array"]
5503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5504    pub ar_u16: [u16; 2],
5505    #[doc = "Value array"]
5506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5507    pub ar_i16: [i16; 2],
5508    #[doc = "Stub field"]
5509    pub v1: u8,
5510    #[doc = "Value array"]
5511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5512    pub ar_u8: [u8; 2],
5513    #[doc = "Value array"]
5514    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5515    pub ar_i8: [i8; 2],
5516    #[doc = "Value array"]
5517    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5518    pub ar_c: [u8; 32],
5519}
5520impl ARRAY_TEST_6_DATA {
5521    pub const ENCODED_LEN: usize = 91usize;
5522    pub const DEFAULT: Self = Self {
5523        ar_d: [0.0_f64; 2usize],
5524        v3: 0_u32,
5525        ar_u32: [0_u32; 2usize],
5526        ar_i32: [0_i32; 2usize],
5527        ar_f: [0.0_f32; 2usize],
5528        v2: 0_u16,
5529        ar_u16: [0_u16; 2usize],
5530        ar_i16: [0_i16; 2usize],
5531        v1: 0_u8,
5532        ar_u8: [0_u8; 2usize],
5533        ar_i8: [0_i8; 2usize],
5534        ar_c: [0_u8; 32usize],
5535    };
5536    #[cfg(feature = "arbitrary")]
5537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5538        use arbitrary::{Arbitrary, Unstructured};
5539        let mut buf = [0u8; 1024];
5540        rng.fill_bytes(&mut buf);
5541        let mut unstructured = Unstructured::new(&buf);
5542        Self::arbitrary(&mut unstructured).unwrap_or_default()
5543    }
5544}
5545impl Default for ARRAY_TEST_6_DATA {
5546    fn default() -> Self {
5547        Self::DEFAULT.clone()
5548    }
5549}
5550impl MessageData for ARRAY_TEST_6_DATA {
5551    type Message = MavMessage;
5552    const ID: u32 = 17156u32;
5553    const NAME: &'static str = "ARRAY_TEST_6";
5554    const EXTRA_CRC: u8 = 14u8;
5555    const ENCODED_LEN: usize = 91usize;
5556    fn deser(
5557        _version: MavlinkVersion,
5558        __input: &[u8],
5559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5560        let avail_len = __input.len();
5561        let mut payload_buf = [0; Self::ENCODED_LEN];
5562        let mut buf = if avail_len < Self::ENCODED_LEN {
5563            payload_buf[0..avail_len].copy_from_slice(__input);
5564            Bytes::new(&payload_buf)
5565        } else {
5566            Bytes::new(__input)
5567        };
5568        let mut __struct = Self::default();
5569        for v in &mut __struct.ar_d {
5570            let val = buf.get_f64_le();
5571            *v = val;
5572        }
5573        __struct.v3 = buf.get_u32_le();
5574        for v in &mut __struct.ar_u32 {
5575            let val = buf.get_u32_le();
5576            *v = val;
5577        }
5578        for v in &mut __struct.ar_i32 {
5579            let val = buf.get_i32_le();
5580            *v = val;
5581        }
5582        for v in &mut __struct.ar_f {
5583            let val = buf.get_f32_le();
5584            *v = val;
5585        }
5586        __struct.v2 = buf.get_u16_le();
5587        for v in &mut __struct.ar_u16 {
5588            let val = buf.get_u16_le();
5589            *v = val;
5590        }
5591        for v in &mut __struct.ar_i16 {
5592            let val = buf.get_i16_le();
5593            *v = val;
5594        }
5595        __struct.v1 = buf.get_u8();
5596        for v in &mut __struct.ar_u8 {
5597            let val = buf.get_u8();
5598            *v = val;
5599        }
5600        for v in &mut __struct.ar_i8 {
5601            let val = buf.get_i8();
5602            *v = val;
5603        }
5604        for v in &mut __struct.ar_c {
5605            let val = buf.get_u8();
5606            *v = val;
5607        }
5608        Ok(__struct)
5609    }
5610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5611        let mut __tmp = BytesMut::new(bytes);
5612        #[allow(clippy::absurd_extreme_comparisons)]
5613        #[allow(unused_comparisons)]
5614        if __tmp.remaining() < Self::ENCODED_LEN {
5615            panic!(
5616                "buffer is too small (need {} bytes, but got {})",
5617                Self::ENCODED_LEN,
5618                __tmp.remaining(),
5619            )
5620        }
5621        for val in &self.ar_d {
5622            __tmp.put_f64_le(*val);
5623        }
5624        __tmp.put_u32_le(self.v3);
5625        for val in &self.ar_u32 {
5626            __tmp.put_u32_le(*val);
5627        }
5628        for val in &self.ar_i32 {
5629            __tmp.put_i32_le(*val);
5630        }
5631        for val in &self.ar_f {
5632            __tmp.put_f32_le(*val);
5633        }
5634        __tmp.put_u16_le(self.v2);
5635        for val in &self.ar_u16 {
5636            __tmp.put_u16_le(*val);
5637        }
5638        for val in &self.ar_i16 {
5639            __tmp.put_i16_le(*val);
5640        }
5641        __tmp.put_u8(self.v1);
5642        for val in &self.ar_u8 {
5643            __tmp.put_u8(*val);
5644        }
5645        for val in &self.ar_i8 {
5646            __tmp.put_i8(*val);
5647        }
5648        for val in &self.ar_c {
5649            __tmp.put_u8(*val);
5650        }
5651        if matches!(version, MavlinkVersion::V2) {
5652            let len = __tmp.len();
5653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5654        } else {
5655            __tmp.len()
5656        }
5657    }
5658}
5659#[doc = "id: 17157"]
5660#[doc = "Array test #7."]
5661#[derive(Debug, Clone, PartialEq)]
5662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5664pub struct ARRAY_TEST_7_DATA {
5665    #[doc = "Value array"]
5666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5667    pub ar_d: [f64; 2],
5668    #[doc = "Value array"]
5669    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5670    pub ar_f: [f32; 2],
5671    #[doc = "Value array"]
5672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5673    pub ar_u32: [u32; 2],
5674    #[doc = "Value array"]
5675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5676    pub ar_i32: [i32; 2],
5677    #[doc = "Value array"]
5678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5679    pub ar_u16: [u16; 2],
5680    #[doc = "Value array"]
5681    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5682    pub ar_i16: [i16; 2],
5683    #[doc = "Value array"]
5684    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5685    pub ar_u8: [u8; 2],
5686    #[doc = "Value array"]
5687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5688    pub ar_i8: [i8; 2],
5689    #[doc = "Value array"]
5690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5691    pub ar_c: [u8; 32],
5692}
5693impl ARRAY_TEST_7_DATA {
5694    pub const ENCODED_LEN: usize = 84usize;
5695    pub const DEFAULT: Self = Self {
5696        ar_d: [0.0_f64; 2usize],
5697        ar_f: [0.0_f32; 2usize],
5698        ar_u32: [0_u32; 2usize],
5699        ar_i32: [0_i32; 2usize],
5700        ar_u16: [0_u16; 2usize],
5701        ar_i16: [0_i16; 2usize],
5702        ar_u8: [0_u8; 2usize],
5703        ar_i8: [0_i8; 2usize],
5704        ar_c: [0_u8; 32usize],
5705    };
5706    #[cfg(feature = "arbitrary")]
5707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5708        use arbitrary::{Arbitrary, Unstructured};
5709        let mut buf = [0u8; 1024];
5710        rng.fill_bytes(&mut buf);
5711        let mut unstructured = Unstructured::new(&buf);
5712        Self::arbitrary(&mut unstructured).unwrap_or_default()
5713    }
5714}
5715impl Default for ARRAY_TEST_7_DATA {
5716    fn default() -> Self {
5717        Self::DEFAULT.clone()
5718    }
5719}
5720impl MessageData for ARRAY_TEST_7_DATA {
5721    type Message = MavMessage;
5722    const ID: u32 = 17157u32;
5723    const NAME: &'static str = "ARRAY_TEST_7";
5724    const EXTRA_CRC: u8 = 187u8;
5725    const ENCODED_LEN: usize = 84usize;
5726    fn deser(
5727        _version: MavlinkVersion,
5728        __input: &[u8],
5729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5730        let avail_len = __input.len();
5731        let mut payload_buf = [0; Self::ENCODED_LEN];
5732        let mut buf = if avail_len < Self::ENCODED_LEN {
5733            payload_buf[0..avail_len].copy_from_slice(__input);
5734            Bytes::new(&payload_buf)
5735        } else {
5736            Bytes::new(__input)
5737        };
5738        let mut __struct = Self::default();
5739        for v in &mut __struct.ar_d {
5740            let val = buf.get_f64_le();
5741            *v = val;
5742        }
5743        for v in &mut __struct.ar_f {
5744            let val = buf.get_f32_le();
5745            *v = val;
5746        }
5747        for v in &mut __struct.ar_u32 {
5748            let val = buf.get_u32_le();
5749            *v = val;
5750        }
5751        for v in &mut __struct.ar_i32 {
5752            let val = buf.get_i32_le();
5753            *v = val;
5754        }
5755        for v in &mut __struct.ar_u16 {
5756            let val = buf.get_u16_le();
5757            *v = val;
5758        }
5759        for v in &mut __struct.ar_i16 {
5760            let val = buf.get_i16_le();
5761            *v = val;
5762        }
5763        for v in &mut __struct.ar_u8 {
5764            let val = buf.get_u8();
5765            *v = val;
5766        }
5767        for v in &mut __struct.ar_i8 {
5768            let val = buf.get_i8();
5769            *v = val;
5770        }
5771        for v in &mut __struct.ar_c {
5772            let val = buf.get_u8();
5773            *v = val;
5774        }
5775        Ok(__struct)
5776    }
5777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5778        let mut __tmp = BytesMut::new(bytes);
5779        #[allow(clippy::absurd_extreme_comparisons)]
5780        #[allow(unused_comparisons)]
5781        if __tmp.remaining() < Self::ENCODED_LEN {
5782            panic!(
5783                "buffer is too small (need {} bytes, but got {})",
5784                Self::ENCODED_LEN,
5785                __tmp.remaining(),
5786            )
5787        }
5788        for val in &self.ar_d {
5789            __tmp.put_f64_le(*val);
5790        }
5791        for val in &self.ar_f {
5792            __tmp.put_f32_le(*val);
5793        }
5794        for val in &self.ar_u32 {
5795            __tmp.put_u32_le(*val);
5796        }
5797        for val in &self.ar_i32 {
5798            __tmp.put_i32_le(*val);
5799        }
5800        for val in &self.ar_u16 {
5801            __tmp.put_u16_le(*val);
5802        }
5803        for val in &self.ar_i16 {
5804            __tmp.put_i16_le(*val);
5805        }
5806        for val in &self.ar_u8 {
5807            __tmp.put_u8(*val);
5808        }
5809        for val in &self.ar_i8 {
5810            __tmp.put_i8(*val);
5811        }
5812        for val in &self.ar_c {
5813            __tmp.put_u8(*val);
5814        }
5815        if matches!(version, MavlinkVersion::V2) {
5816            let len = __tmp.len();
5817            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5818        } else {
5819            __tmp.len()
5820        }
5821    }
5822}
5823#[doc = "id: 17158"]
5824#[doc = "Array test #8."]
5825#[derive(Debug, Clone, PartialEq)]
5826#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5828pub struct ARRAY_TEST_8_DATA {
5829    #[doc = "Value array"]
5830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5831    pub ar_d: [f64; 2],
5832    #[doc = "Stub field"]
5833    pub v3: u32,
5834    #[doc = "Value array"]
5835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5836    pub ar_u16: [u16; 2],
5837}
5838impl ARRAY_TEST_8_DATA {
5839    pub const ENCODED_LEN: usize = 24usize;
5840    pub const DEFAULT: Self = Self {
5841        ar_d: [0.0_f64; 2usize],
5842        v3: 0_u32,
5843        ar_u16: [0_u16; 2usize],
5844    };
5845    #[cfg(feature = "arbitrary")]
5846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5847        use arbitrary::{Arbitrary, Unstructured};
5848        let mut buf = [0u8; 1024];
5849        rng.fill_bytes(&mut buf);
5850        let mut unstructured = Unstructured::new(&buf);
5851        Self::arbitrary(&mut unstructured).unwrap_or_default()
5852    }
5853}
5854impl Default for ARRAY_TEST_8_DATA {
5855    fn default() -> Self {
5856        Self::DEFAULT.clone()
5857    }
5858}
5859impl MessageData for ARRAY_TEST_8_DATA {
5860    type Message = MavMessage;
5861    const ID: u32 = 17158u32;
5862    const NAME: &'static str = "ARRAY_TEST_8";
5863    const EXTRA_CRC: u8 = 106u8;
5864    const ENCODED_LEN: usize = 24usize;
5865    fn deser(
5866        _version: MavlinkVersion,
5867        __input: &[u8],
5868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5869        let avail_len = __input.len();
5870        let mut payload_buf = [0; Self::ENCODED_LEN];
5871        let mut buf = if avail_len < Self::ENCODED_LEN {
5872            payload_buf[0..avail_len].copy_from_slice(__input);
5873            Bytes::new(&payload_buf)
5874        } else {
5875            Bytes::new(__input)
5876        };
5877        let mut __struct = Self::default();
5878        for v in &mut __struct.ar_d {
5879            let val = buf.get_f64_le();
5880            *v = val;
5881        }
5882        __struct.v3 = buf.get_u32_le();
5883        for v in &mut __struct.ar_u16 {
5884            let val = buf.get_u16_le();
5885            *v = val;
5886        }
5887        Ok(__struct)
5888    }
5889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5890        let mut __tmp = BytesMut::new(bytes);
5891        #[allow(clippy::absurd_extreme_comparisons)]
5892        #[allow(unused_comparisons)]
5893        if __tmp.remaining() < Self::ENCODED_LEN {
5894            panic!(
5895                "buffer is too small (need {} bytes, but got {})",
5896                Self::ENCODED_LEN,
5897                __tmp.remaining(),
5898            )
5899        }
5900        for val in &self.ar_d {
5901            __tmp.put_f64_le(*val);
5902        }
5903        __tmp.put_u32_le(self.v3);
5904        for val in &self.ar_u16 {
5905            __tmp.put_u16_le(*val);
5906        }
5907        if matches!(version, MavlinkVersion::V2) {
5908            let len = __tmp.len();
5909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5910        } else {
5911            __tmp.len()
5912        }
5913    }
5914}
5915#[doc = "id: 30"]
5916#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5917#[derive(Debug, Clone, PartialEq)]
5918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5920pub struct ATTITUDE_DATA {
5921    #[doc = "Timestamp (time since system boot)."]
5922    pub time_boot_ms: u32,
5923    #[doc = "Roll angle (-pi..+pi)"]
5924    pub roll: f32,
5925    #[doc = "Pitch angle (-pi..+pi)"]
5926    pub pitch: f32,
5927    #[doc = "Yaw angle (-pi..+pi)"]
5928    pub yaw: f32,
5929    #[doc = "Roll angular speed"]
5930    pub rollspeed: f32,
5931    #[doc = "Pitch angular speed"]
5932    pub pitchspeed: f32,
5933    #[doc = "Yaw angular speed"]
5934    pub yawspeed: f32,
5935}
5936impl ATTITUDE_DATA {
5937    pub const ENCODED_LEN: usize = 28usize;
5938    pub const DEFAULT: Self = Self {
5939        time_boot_ms: 0_u32,
5940        roll: 0.0_f32,
5941        pitch: 0.0_f32,
5942        yaw: 0.0_f32,
5943        rollspeed: 0.0_f32,
5944        pitchspeed: 0.0_f32,
5945        yawspeed: 0.0_f32,
5946    };
5947    #[cfg(feature = "arbitrary")]
5948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5949        use arbitrary::{Arbitrary, Unstructured};
5950        let mut buf = [0u8; 1024];
5951        rng.fill_bytes(&mut buf);
5952        let mut unstructured = Unstructured::new(&buf);
5953        Self::arbitrary(&mut unstructured).unwrap_or_default()
5954    }
5955}
5956impl Default for ATTITUDE_DATA {
5957    fn default() -> Self {
5958        Self::DEFAULT.clone()
5959    }
5960}
5961impl MessageData for ATTITUDE_DATA {
5962    type Message = MavMessage;
5963    const ID: u32 = 30u32;
5964    const NAME: &'static str = "ATTITUDE";
5965    const EXTRA_CRC: u8 = 39u8;
5966    const ENCODED_LEN: usize = 28usize;
5967    fn deser(
5968        _version: MavlinkVersion,
5969        __input: &[u8],
5970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5971        let avail_len = __input.len();
5972        let mut payload_buf = [0; Self::ENCODED_LEN];
5973        let mut buf = if avail_len < Self::ENCODED_LEN {
5974            payload_buf[0..avail_len].copy_from_slice(__input);
5975            Bytes::new(&payload_buf)
5976        } else {
5977            Bytes::new(__input)
5978        };
5979        let mut __struct = Self::default();
5980        __struct.time_boot_ms = buf.get_u32_le();
5981        __struct.roll = buf.get_f32_le();
5982        __struct.pitch = buf.get_f32_le();
5983        __struct.yaw = buf.get_f32_le();
5984        __struct.rollspeed = buf.get_f32_le();
5985        __struct.pitchspeed = buf.get_f32_le();
5986        __struct.yawspeed = buf.get_f32_le();
5987        Ok(__struct)
5988    }
5989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5990        let mut __tmp = BytesMut::new(bytes);
5991        #[allow(clippy::absurd_extreme_comparisons)]
5992        #[allow(unused_comparisons)]
5993        if __tmp.remaining() < Self::ENCODED_LEN {
5994            panic!(
5995                "buffer is too small (need {} bytes, but got {})",
5996                Self::ENCODED_LEN,
5997                __tmp.remaining(),
5998            )
5999        }
6000        __tmp.put_u32_le(self.time_boot_ms);
6001        __tmp.put_f32_le(self.roll);
6002        __tmp.put_f32_le(self.pitch);
6003        __tmp.put_f32_le(self.yaw);
6004        __tmp.put_f32_le(self.rollspeed);
6005        __tmp.put_f32_le(self.pitchspeed);
6006        __tmp.put_f32_le(self.yawspeed);
6007        if matches!(version, MavlinkVersion::V2) {
6008            let len = __tmp.len();
6009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6010        } else {
6011            __tmp.len()
6012        }
6013    }
6014}
6015#[doc = "id: 31"]
6016#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6017#[derive(Debug, Clone, PartialEq)]
6018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6020pub struct ATTITUDE_QUATERNION_DATA {
6021    #[doc = "Timestamp (time since system boot)."]
6022    pub time_boot_ms: u32,
6023    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
6024    pub q1: f32,
6025    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
6026    pub q2: f32,
6027    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
6028    pub q3: f32,
6029    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
6030    pub q4: f32,
6031    #[doc = "Roll angular speed"]
6032    pub rollspeed: f32,
6033    #[doc = "Pitch angular speed"]
6034    pub pitchspeed: f32,
6035    #[doc = "Yaw angular speed"]
6036    pub yawspeed: f32,
6037    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
6038    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6039    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6040    pub repr_offset_q: [f32; 4],
6041}
6042impl ATTITUDE_QUATERNION_DATA {
6043    pub const ENCODED_LEN: usize = 48usize;
6044    pub const DEFAULT: Self = Self {
6045        time_boot_ms: 0_u32,
6046        q1: 0.0_f32,
6047        q2: 0.0_f32,
6048        q3: 0.0_f32,
6049        q4: 0.0_f32,
6050        rollspeed: 0.0_f32,
6051        pitchspeed: 0.0_f32,
6052        yawspeed: 0.0_f32,
6053        repr_offset_q: [0.0_f32; 4usize],
6054    };
6055    #[cfg(feature = "arbitrary")]
6056    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6057        use arbitrary::{Arbitrary, Unstructured};
6058        let mut buf = [0u8; 1024];
6059        rng.fill_bytes(&mut buf);
6060        let mut unstructured = Unstructured::new(&buf);
6061        Self::arbitrary(&mut unstructured).unwrap_or_default()
6062    }
6063}
6064impl Default for ATTITUDE_QUATERNION_DATA {
6065    fn default() -> Self {
6066        Self::DEFAULT.clone()
6067    }
6068}
6069impl MessageData for ATTITUDE_QUATERNION_DATA {
6070    type Message = MavMessage;
6071    const ID: u32 = 31u32;
6072    const NAME: &'static str = "ATTITUDE_QUATERNION";
6073    const EXTRA_CRC: u8 = 246u8;
6074    const ENCODED_LEN: usize = 48usize;
6075    fn deser(
6076        _version: MavlinkVersion,
6077        __input: &[u8],
6078    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6079        let avail_len = __input.len();
6080        let mut payload_buf = [0; Self::ENCODED_LEN];
6081        let mut buf = if avail_len < Self::ENCODED_LEN {
6082            payload_buf[0..avail_len].copy_from_slice(__input);
6083            Bytes::new(&payload_buf)
6084        } else {
6085            Bytes::new(__input)
6086        };
6087        let mut __struct = Self::default();
6088        __struct.time_boot_ms = buf.get_u32_le();
6089        __struct.q1 = buf.get_f32_le();
6090        __struct.q2 = buf.get_f32_le();
6091        __struct.q3 = buf.get_f32_le();
6092        __struct.q4 = buf.get_f32_le();
6093        __struct.rollspeed = buf.get_f32_le();
6094        __struct.pitchspeed = buf.get_f32_le();
6095        __struct.yawspeed = buf.get_f32_le();
6096        for v in &mut __struct.repr_offset_q {
6097            let val = buf.get_f32_le();
6098            *v = val;
6099        }
6100        Ok(__struct)
6101    }
6102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6103        let mut __tmp = BytesMut::new(bytes);
6104        #[allow(clippy::absurd_extreme_comparisons)]
6105        #[allow(unused_comparisons)]
6106        if __tmp.remaining() < Self::ENCODED_LEN {
6107            panic!(
6108                "buffer is too small (need {} bytes, but got {})",
6109                Self::ENCODED_LEN,
6110                __tmp.remaining(),
6111            )
6112        }
6113        __tmp.put_u32_le(self.time_boot_ms);
6114        __tmp.put_f32_le(self.q1);
6115        __tmp.put_f32_le(self.q2);
6116        __tmp.put_f32_le(self.q3);
6117        __tmp.put_f32_le(self.q4);
6118        __tmp.put_f32_le(self.rollspeed);
6119        __tmp.put_f32_le(self.pitchspeed);
6120        __tmp.put_f32_le(self.yawspeed);
6121        for val in &self.repr_offset_q {
6122            __tmp.put_f32_le(*val);
6123        }
6124        if matches!(version, MavlinkVersion::V2) {
6125            let len = __tmp.len();
6126            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6127        } else {
6128            __tmp.len()
6129        }
6130    }
6131}
6132#[doc = "id: 61"]
6133#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
6134#[derive(Debug, Clone, PartialEq)]
6135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6137pub struct ATTITUDE_QUATERNION_COV_DATA {
6138    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6139    pub time_usec: u64,
6140    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
6141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6142    pub q: [f32; 4],
6143    #[doc = "Roll angular speed"]
6144    pub rollspeed: f32,
6145    #[doc = "Pitch angular speed"]
6146    pub pitchspeed: f32,
6147    #[doc = "Yaw angular speed"]
6148    pub yawspeed: f32,
6149    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
6150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6151    pub covariance: [f32; 9],
6152}
6153impl ATTITUDE_QUATERNION_COV_DATA {
6154    pub const ENCODED_LEN: usize = 72usize;
6155    pub const DEFAULT: Self = Self {
6156        time_usec: 0_u64,
6157        q: [0.0_f32; 4usize],
6158        rollspeed: 0.0_f32,
6159        pitchspeed: 0.0_f32,
6160        yawspeed: 0.0_f32,
6161        covariance: [0.0_f32; 9usize],
6162    };
6163    #[cfg(feature = "arbitrary")]
6164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6165        use arbitrary::{Arbitrary, Unstructured};
6166        let mut buf = [0u8; 1024];
6167        rng.fill_bytes(&mut buf);
6168        let mut unstructured = Unstructured::new(&buf);
6169        Self::arbitrary(&mut unstructured).unwrap_or_default()
6170    }
6171}
6172impl Default for ATTITUDE_QUATERNION_COV_DATA {
6173    fn default() -> Self {
6174        Self::DEFAULT.clone()
6175    }
6176}
6177impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
6178    type Message = MavMessage;
6179    const ID: u32 = 61u32;
6180    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
6181    const EXTRA_CRC: u8 = 167u8;
6182    const ENCODED_LEN: usize = 72usize;
6183    fn deser(
6184        _version: MavlinkVersion,
6185        __input: &[u8],
6186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6187        let avail_len = __input.len();
6188        let mut payload_buf = [0; Self::ENCODED_LEN];
6189        let mut buf = if avail_len < Self::ENCODED_LEN {
6190            payload_buf[0..avail_len].copy_from_slice(__input);
6191            Bytes::new(&payload_buf)
6192        } else {
6193            Bytes::new(__input)
6194        };
6195        let mut __struct = Self::default();
6196        __struct.time_usec = buf.get_u64_le();
6197        for v in &mut __struct.q {
6198            let val = buf.get_f32_le();
6199            *v = val;
6200        }
6201        __struct.rollspeed = buf.get_f32_le();
6202        __struct.pitchspeed = buf.get_f32_le();
6203        __struct.yawspeed = buf.get_f32_le();
6204        for v in &mut __struct.covariance {
6205            let val = buf.get_f32_le();
6206            *v = val;
6207        }
6208        Ok(__struct)
6209    }
6210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6211        let mut __tmp = BytesMut::new(bytes);
6212        #[allow(clippy::absurd_extreme_comparisons)]
6213        #[allow(unused_comparisons)]
6214        if __tmp.remaining() < Self::ENCODED_LEN {
6215            panic!(
6216                "buffer is too small (need {} bytes, but got {})",
6217                Self::ENCODED_LEN,
6218                __tmp.remaining(),
6219            )
6220        }
6221        __tmp.put_u64_le(self.time_usec);
6222        for val in &self.q {
6223            __tmp.put_f32_le(*val);
6224        }
6225        __tmp.put_f32_le(self.rollspeed);
6226        __tmp.put_f32_le(self.pitchspeed);
6227        __tmp.put_f32_le(self.yawspeed);
6228        for val in &self.covariance {
6229            __tmp.put_f32_le(*val);
6230        }
6231        if matches!(version, MavlinkVersion::V2) {
6232            let len = __tmp.len();
6233            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6234        } else {
6235            __tmp.len()
6236        }
6237    }
6238}
6239#[doc = "id: 83"]
6240#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
6241#[derive(Debug, Clone, PartialEq)]
6242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6244pub struct ATTITUDE_TARGET_DATA {
6245    #[doc = "Timestamp (time since system boot)."]
6246    pub time_boot_ms: u32,
6247    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6249    pub q: [f32; 4],
6250    #[doc = "Body roll rate"]
6251    pub body_roll_rate: f32,
6252    #[doc = "Body pitch rate"]
6253    pub body_pitch_rate: f32,
6254    #[doc = "Body yaw rate"]
6255    pub body_yaw_rate: f32,
6256    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
6257    pub thrust: f32,
6258    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
6259    pub type_mask: AttitudeTargetTypemask,
6260}
6261impl ATTITUDE_TARGET_DATA {
6262    pub const ENCODED_LEN: usize = 37usize;
6263    pub const DEFAULT: Self = Self {
6264        time_boot_ms: 0_u32,
6265        q: [0.0_f32; 4usize],
6266        body_roll_rate: 0.0_f32,
6267        body_pitch_rate: 0.0_f32,
6268        body_yaw_rate: 0.0_f32,
6269        thrust: 0.0_f32,
6270        type_mask: AttitudeTargetTypemask::DEFAULT,
6271    };
6272    #[cfg(feature = "arbitrary")]
6273    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6274        use arbitrary::{Arbitrary, Unstructured};
6275        let mut buf = [0u8; 1024];
6276        rng.fill_bytes(&mut buf);
6277        let mut unstructured = Unstructured::new(&buf);
6278        Self::arbitrary(&mut unstructured).unwrap_or_default()
6279    }
6280}
6281impl Default for ATTITUDE_TARGET_DATA {
6282    fn default() -> Self {
6283        Self::DEFAULT.clone()
6284    }
6285}
6286impl MessageData for ATTITUDE_TARGET_DATA {
6287    type Message = MavMessage;
6288    const ID: u32 = 83u32;
6289    const NAME: &'static str = "ATTITUDE_TARGET";
6290    const EXTRA_CRC: u8 = 22u8;
6291    const ENCODED_LEN: usize = 37usize;
6292    fn deser(
6293        _version: MavlinkVersion,
6294        __input: &[u8],
6295    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6296        let avail_len = __input.len();
6297        let mut payload_buf = [0; Self::ENCODED_LEN];
6298        let mut buf = if avail_len < Self::ENCODED_LEN {
6299            payload_buf[0..avail_len].copy_from_slice(__input);
6300            Bytes::new(&payload_buf)
6301        } else {
6302            Bytes::new(__input)
6303        };
6304        let mut __struct = Self::default();
6305        __struct.time_boot_ms = buf.get_u32_le();
6306        for v in &mut __struct.q {
6307            let val = buf.get_f32_le();
6308            *v = val;
6309        }
6310        __struct.body_roll_rate = buf.get_f32_le();
6311        __struct.body_pitch_rate = buf.get_f32_le();
6312        __struct.body_yaw_rate = buf.get_f32_le();
6313        __struct.thrust = buf.get_f32_le();
6314        let tmp = buf.get_u8();
6315        __struct.type_mask = AttitudeTargetTypemask::from_bits(
6316            tmp & AttitudeTargetTypemask::all().bits(),
6317        )
6318        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6319            flag_type: "AttitudeTargetTypemask",
6320            value: tmp as u32,
6321        })?;
6322        Ok(__struct)
6323    }
6324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6325        let mut __tmp = BytesMut::new(bytes);
6326        #[allow(clippy::absurd_extreme_comparisons)]
6327        #[allow(unused_comparisons)]
6328        if __tmp.remaining() < Self::ENCODED_LEN {
6329            panic!(
6330                "buffer is too small (need {} bytes, but got {})",
6331                Self::ENCODED_LEN,
6332                __tmp.remaining(),
6333            )
6334        }
6335        __tmp.put_u32_le(self.time_boot_ms);
6336        for val in &self.q {
6337            __tmp.put_f32_le(*val);
6338        }
6339        __tmp.put_f32_le(self.body_roll_rate);
6340        __tmp.put_f32_le(self.body_pitch_rate);
6341        __tmp.put_f32_le(self.body_yaw_rate);
6342        __tmp.put_f32_le(self.thrust);
6343        __tmp.put_u8(self.type_mask.bits());
6344        if matches!(version, MavlinkVersion::V2) {
6345            let len = __tmp.len();
6346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6347        } else {
6348            __tmp.len()
6349        }
6350    }
6351}
6352#[doc = "id: 138"]
6353#[doc = "Motion capture attitude and position."]
6354#[derive(Debug, Clone, PartialEq)]
6355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6357pub struct ATT_POS_MOCAP_DATA {
6358    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6359    pub time_usec: u64,
6360    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6362    pub q: [f32; 4],
6363    #[doc = "X position (NED)"]
6364    pub x: f32,
6365    #[doc = "Y position (NED)"]
6366    pub y: f32,
6367    #[doc = "Z position (NED)"]
6368    pub z: f32,
6369    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6371    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6372    pub covariance: [f32; 21],
6373}
6374impl ATT_POS_MOCAP_DATA {
6375    pub const ENCODED_LEN: usize = 120usize;
6376    pub const DEFAULT: Self = Self {
6377        time_usec: 0_u64,
6378        q: [0.0_f32; 4usize],
6379        x: 0.0_f32,
6380        y: 0.0_f32,
6381        z: 0.0_f32,
6382        covariance: [0.0_f32; 21usize],
6383    };
6384    #[cfg(feature = "arbitrary")]
6385    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6386        use arbitrary::{Arbitrary, Unstructured};
6387        let mut buf = [0u8; 1024];
6388        rng.fill_bytes(&mut buf);
6389        let mut unstructured = Unstructured::new(&buf);
6390        Self::arbitrary(&mut unstructured).unwrap_or_default()
6391    }
6392}
6393impl Default for ATT_POS_MOCAP_DATA {
6394    fn default() -> Self {
6395        Self::DEFAULT.clone()
6396    }
6397}
6398impl MessageData for ATT_POS_MOCAP_DATA {
6399    type Message = MavMessage;
6400    const ID: u32 = 138u32;
6401    const NAME: &'static str = "ATT_POS_MOCAP";
6402    const EXTRA_CRC: u8 = 109u8;
6403    const ENCODED_LEN: usize = 120usize;
6404    fn deser(
6405        _version: MavlinkVersion,
6406        __input: &[u8],
6407    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6408        let avail_len = __input.len();
6409        let mut payload_buf = [0; Self::ENCODED_LEN];
6410        let mut buf = if avail_len < Self::ENCODED_LEN {
6411            payload_buf[0..avail_len].copy_from_slice(__input);
6412            Bytes::new(&payload_buf)
6413        } else {
6414            Bytes::new(__input)
6415        };
6416        let mut __struct = Self::default();
6417        __struct.time_usec = buf.get_u64_le();
6418        for v in &mut __struct.q {
6419            let val = buf.get_f32_le();
6420            *v = val;
6421        }
6422        __struct.x = buf.get_f32_le();
6423        __struct.y = buf.get_f32_le();
6424        __struct.z = buf.get_f32_le();
6425        for v in &mut __struct.covariance {
6426            let val = buf.get_f32_le();
6427            *v = val;
6428        }
6429        Ok(__struct)
6430    }
6431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6432        let mut __tmp = BytesMut::new(bytes);
6433        #[allow(clippy::absurd_extreme_comparisons)]
6434        #[allow(unused_comparisons)]
6435        if __tmp.remaining() < Self::ENCODED_LEN {
6436            panic!(
6437                "buffer is too small (need {} bytes, but got {})",
6438                Self::ENCODED_LEN,
6439                __tmp.remaining(),
6440            )
6441        }
6442        __tmp.put_u64_le(self.time_usec);
6443        for val in &self.q {
6444            __tmp.put_f32_le(*val);
6445        }
6446        __tmp.put_f32_le(self.x);
6447        __tmp.put_f32_le(self.y);
6448        __tmp.put_f32_le(self.z);
6449        for val in &self.covariance {
6450            __tmp.put_f32_le(*val);
6451        }
6452        if matches!(version, MavlinkVersion::V2) {
6453            let len = __tmp.len();
6454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6455        } else {
6456            __tmp.len()
6457        }
6458    }
6459}
6460#[doc = "id: 7"]
6461#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6462#[derive(Debug, Clone, PartialEq)]
6463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6465pub struct AUTH_KEY_DATA {
6466    #[doc = "key"]
6467    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6468    pub key: [u8; 32],
6469}
6470impl AUTH_KEY_DATA {
6471    pub const ENCODED_LEN: usize = 32usize;
6472    pub const DEFAULT: Self = Self {
6473        key: [0_u8; 32usize],
6474    };
6475    #[cfg(feature = "arbitrary")]
6476    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6477        use arbitrary::{Arbitrary, Unstructured};
6478        let mut buf = [0u8; 1024];
6479        rng.fill_bytes(&mut buf);
6480        let mut unstructured = Unstructured::new(&buf);
6481        Self::arbitrary(&mut unstructured).unwrap_or_default()
6482    }
6483}
6484impl Default for AUTH_KEY_DATA {
6485    fn default() -> Self {
6486        Self::DEFAULT.clone()
6487    }
6488}
6489impl MessageData for AUTH_KEY_DATA {
6490    type Message = MavMessage;
6491    const ID: u32 = 7u32;
6492    const NAME: &'static str = "AUTH_KEY";
6493    const EXTRA_CRC: u8 = 119u8;
6494    const ENCODED_LEN: usize = 32usize;
6495    fn deser(
6496        _version: MavlinkVersion,
6497        __input: &[u8],
6498    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6499        let avail_len = __input.len();
6500        let mut payload_buf = [0; Self::ENCODED_LEN];
6501        let mut buf = if avail_len < Self::ENCODED_LEN {
6502            payload_buf[0..avail_len].copy_from_slice(__input);
6503            Bytes::new(&payload_buf)
6504        } else {
6505            Bytes::new(__input)
6506        };
6507        let mut __struct = Self::default();
6508        for v in &mut __struct.key {
6509            let val = buf.get_u8();
6510            *v = val;
6511        }
6512        Ok(__struct)
6513    }
6514    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6515        let mut __tmp = BytesMut::new(bytes);
6516        #[allow(clippy::absurd_extreme_comparisons)]
6517        #[allow(unused_comparisons)]
6518        if __tmp.remaining() < Self::ENCODED_LEN {
6519            panic!(
6520                "buffer is too small (need {} bytes, but got {})",
6521                Self::ENCODED_LEN,
6522                __tmp.remaining(),
6523            )
6524        }
6525        for val in &self.key {
6526            __tmp.put_u8(*val);
6527        }
6528        if matches!(version, MavlinkVersion::V2) {
6529            let len = __tmp.len();
6530            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6531        } else {
6532            __tmp.len()
6533        }
6534    }
6535}
6536#[doc = "id: 286"]
6537#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6538#[derive(Debug, Clone, PartialEq)]
6539#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6540#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6541pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6542    #[doc = "Timestamp (time since system boot)."]
6543    pub time_boot_us: u64,
6544    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6546    pub q: [f32; 4],
6547    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6548    pub q_estimated_delay_us: u32,
6549    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6550    pub vx: f32,
6551    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6552    pub vy: f32,
6553    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6554    pub vz: f32,
6555    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6556    pub v_estimated_delay_us: u32,
6557    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6558    pub feed_forward_angular_velocity_z: f32,
6559    #[doc = "Bitmap indicating which estimator outputs are valid."]
6560    pub estimator_status: EstimatorStatusFlags,
6561    #[doc = "System ID"]
6562    pub target_system: u8,
6563    #[doc = "Component ID"]
6564    pub target_component: u8,
6565    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6566    pub landed_state: MavLandedState,
6567    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6568    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6569    pub angular_velocity_z: f32,
6570}
6571impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6572    pub const ENCODED_LEN: usize = 57usize;
6573    pub const DEFAULT: Self = Self {
6574        time_boot_us: 0_u64,
6575        q: [0.0_f32; 4usize],
6576        q_estimated_delay_us: 0_u32,
6577        vx: 0.0_f32,
6578        vy: 0.0_f32,
6579        vz: 0.0_f32,
6580        v_estimated_delay_us: 0_u32,
6581        feed_forward_angular_velocity_z: 0.0_f32,
6582        estimator_status: EstimatorStatusFlags::DEFAULT,
6583        target_system: 0_u8,
6584        target_component: 0_u8,
6585        landed_state: MavLandedState::DEFAULT,
6586        angular_velocity_z: 0.0_f32,
6587    };
6588    #[cfg(feature = "arbitrary")]
6589    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6590        use arbitrary::{Arbitrary, Unstructured};
6591        let mut buf = [0u8; 1024];
6592        rng.fill_bytes(&mut buf);
6593        let mut unstructured = Unstructured::new(&buf);
6594        Self::arbitrary(&mut unstructured).unwrap_or_default()
6595    }
6596}
6597impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6598    fn default() -> Self {
6599        Self::DEFAULT.clone()
6600    }
6601}
6602impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6603    type Message = MavMessage;
6604    const ID: u32 = 286u32;
6605    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6606    const EXTRA_CRC: u8 = 210u8;
6607    const ENCODED_LEN: usize = 57usize;
6608    fn deser(
6609        _version: MavlinkVersion,
6610        __input: &[u8],
6611    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6612        let avail_len = __input.len();
6613        let mut payload_buf = [0; Self::ENCODED_LEN];
6614        let mut buf = if avail_len < Self::ENCODED_LEN {
6615            payload_buf[0..avail_len].copy_from_slice(__input);
6616            Bytes::new(&payload_buf)
6617        } else {
6618            Bytes::new(__input)
6619        };
6620        let mut __struct = Self::default();
6621        __struct.time_boot_us = buf.get_u64_le();
6622        for v in &mut __struct.q {
6623            let val = buf.get_f32_le();
6624            *v = val;
6625        }
6626        __struct.q_estimated_delay_us = buf.get_u32_le();
6627        __struct.vx = buf.get_f32_le();
6628        __struct.vy = buf.get_f32_le();
6629        __struct.vz = buf.get_f32_le();
6630        __struct.v_estimated_delay_us = buf.get_u32_le();
6631        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6632        let tmp = buf.get_u16_le();
6633        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6634            tmp & EstimatorStatusFlags::all().bits(),
6635        )
6636        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6637            flag_type: "EstimatorStatusFlags",
6638            value: tmp as u32,
6639        })?;
6640        __struct.target_system = buf.get_u8();
6641        __struct.target_component = buf.get_u8();
6642        let tmp = buf.get_u8();
6643        __struct.landed_state =
6644            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6645                enum_type: "MavLandedState",
6646                value: tmp as u32,
6647            })?;
6648        __struct.angular_velocity_z = buf.get_f32_le();
6649        Ok(__struct)
6650    }
6651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6652        let mut __tmp = BytesMut::new(bytes);
6653        #[allow(clippy::absurd_extreme_comparisons)]
6654        #[allow(unused_comparisons)]
6655        if __tmp.remaining() < Self::ENCODED_LEN {
6656            panic!(
6657                "buffer is too small (need {} bytes, but got {})",
6658                Self::ENCODED_LEN,
6659                __tmp.remaining(),
6660            )
6661        }
6662        __tmp.put_u64_le(self.time_boot_us);
6663        for val in &self.q {
6664            __tmp.put_f32_le(*val);
6665        }
6666        __tmp.put_u32_le(self.q_estimated_delay_us);
6667        __tmp.put_f32_le(self.vx);
6668        __tmp.put_f32_le(self.vy);
6669        __tmp.put_f32_le(self.vz);
6670        __tmp.put_u32_le(self.v_estimated_delay_us);
6671        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6672        __tmp.put_u16_le(self.estimator_status.bits());
6673        __tmp.put_u8(self.target_system);
6674        __tmp.put_u8(self.target_component);
6675        __tmp.put_u8(self.landed_state as u8);
6676        __tmp.put_f32_le(self.angular_velocity_z);
6677        if matches!(version, MavlinkVersion::V2) {
6678            let len = __tmp.len();
6679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6680        } else {
6681            __tmp.len()
6682        }
6683    }
6684}
6685#[doc = "id: 148"]
6686#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6687#[derive(Debug, Clone, PartialEq)]
6688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6690pub struct AUTOPILOT_VERSION_DATA {
6691    #[doc = "Bitmap of capabilities"]
6692    pub capabilities: MavProtocolCapability,
6693    #[doc = "UID if provided by hardware (see uid2)"]
6694    pub uid: u64,
6695    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6696    pub flight_sw_version: u32,
6697    #[doc = "Middleware version number"]
6698    pub middleware_sw_version: u32,
6699    #[doc = "Operating system version number"]
6700    pub os_sw_version: u32,
6701    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6702    pub board_version: u32,
6703    #[doc = "ID of the board vendor"]
6704    pub vendor_id: u16,
6705    #[doc = "ID of the product"]
6706    pub product_id: u16,
6707    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6709    pub flight_custom_version: [u8; 8],
6710    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6711    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6712    pub middleware_custom_version: [u8; 8],
6713    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6715    pub os_custom_version: [u8; 8],
6716    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6717    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6719    pub uid2: [u8; 18],
6720}
6721impl AUTOPILOT_VERSION_DATA {
6722    pub const ENCODED_LEN: usize = 78usize;
6723    pub const DEFAULT: Self = Self {
6724        capabilities: MavProtocolCapability::DEFAULT,
6725        uid: 0_u64,
6726        flight_sw_version: 0_u32,
6727        middleware_sw_version: 0_u32,
6728        os_sw_version: 0_u32,
6729        board_version: 0_u32,
6730        vendor_id: 0_u16,
6731        product_id: 0_u16,
6732        flight_custom_version: [0_u8; 8usize],
6733        middleware_custom_version: [0_u8; 8usize],
6734        os_custom_version: [0_u8; 8usize],
6735        uid2: [0_u8; 18usize],
6736    };
6737    #[cfg(feature = "arbitrary")]
6738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6739        use arbitrary::{Arbitrary, Unstructured};
6740        let mut buf = [0u8; 1024];
6741        rng.fill_bytes(&mut buf);
6742        let mut unstructured = Unstructured::new(&buf);
6743        Self::arbitrary(&mut unstructured).unwrap_or_default()
6744    }
6745}
6746impl Default for AUTOPILOT_VERSION_DATA {
6747    fn default() -> Self {
6748        Self::DEFAULT.clone()
6749    }
6750}
6751impl MessageData for AUTOPILOT_VERSION_DATA {
6752    type Message = MavMessage;
6753    const ID: u32 = 148u32;
6754    const NAME: &'static str = "AUTOPILOT_VERSION";
6755    const EXTRA_CRC: u8 = 178u8;
6756    const ENCODED_LEN: usize = 78usize;
6757    fn deser(
6758        _version: MavlinkVersion,
6759        __input: &[u8],
6760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6761        let avail_len = __input.len();
6762        let mut payload_buf = [0; Self::ENCODED_LEN];
6763        let mut buf = if avail_len < Self::ENCODED_LEN {
6764            payload_buf[0..avail_len].copy_from_slice(__input);
6765            Bytes::new(&payload_buf)
6766        } else {
6767            Bytes::new(__input)
6768        };
6769        let mut __struct = Self::default();
6770        let tmp = buf.get_u64_le();
6771        __struct.capabilities = MavProtocolCapability::from_bits(
6772            tmp & MavProtocolCapability::all().bits(),
6773        )
6774        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6775            flag_type: "MavProtocolCapability",
6776            value: tmp as u32,
6777        })?;
6778        __struct.uid = buf.get_u64_le();
6779        __struct.flight_sw_version = buf.get_u32_le();
6780        __struct.middleware_sw_version = buf.get_u32_le();
6781        __struct.os_sw_version = buf.get_u32_le();
6782        __struct.board_version = buf.get_u32_le();
6783        __struct.vendor_id = buf.get_u16_le();
6784        __struct.product_id = buf.get_u16_le();
6785        for v in &mut __struct.flight_custom_version {
6786            let val = buf.get_u8();
6787            *v = val;
6788        }
6789        for v in &mut __struct.middleware_custom_version {
6790            let val = buf.get_u8();
6791            *v = val;
6792        }
6793        for v in &mut __struct.os_custom_version {
6794            let val = buf.get_u8();
6795            *v = val;
6796        }
6797        for v in &mut __struct.uid2 {
6798            let val = buf.get_u8();
6799            *v = val;
6800        }
6801        Ok(__struct)
6802    }
6803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6804        let mut __tmp = BytesMut::new(bytes);
6805        #[allow(clippy::absurd_extreme_comparisons)]
6806        #[allow(unused_comparisons)]
6807        if __tmp.remaining() < Self::ENCODED_LEN {
6808            panic!(
6809                "buffer is too small (need {} bytes, but got {})",
6810                Self::ENCODED_LEN,
6811                __tmp.remaining(),
6812            )
6813        }
6814        __tmp.put_u64_le(self.capabilities.bits());
6815        __tmp.put_u64_le(self.uid);
6816        __tmp.put_u32_le(self.flight_sw_version);
6817        __tmp.put_u32_le(self.middleware_sw_version);
6818        __tmp.put_u32_le(self.os_sw_version);
6819        __tmp.put_u32_le(self.board_version);
6820        __tmp.put_u16_le(self.vendor_id);
6821        __tmp.put_u16_le(self.product_id);
6822        for val in &self.flight_custom_version {
6823            __tmp.put_u8(*val);
6824        }
6825        for val in &self.middleware_custom_version {
6826            __tmp.put_u8(*val);
6827        }
6828        for val in &self.os_custom_version {
6829            __tmp.put_u8(*val);
6830        }
6831        for val in &self.uid2 {
6832            __tmp.put_u8(*val);
6833        }
6834        if matches!(version, MavlinkVersion::V2) {
6835            let len = __tmp.len();
6836            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6837        } else {
6838            __tmp.len()
6839        }
6840    }
6841}
6842#[doc = "id: 435"]
6843#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6844#[derive(Debug, Clone, PartialEq)]
6845#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6846#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6847pub struct AVAILABLE_MODES_DATA {
6848    #[doc = "A bitfield for use for autopilot-specific flags"]
6849    pub custom_mode: u32,
6850    #[doc = "Mode properties."]
6851    pub properties: MavModeProperty,
6852    #[doc = "The total number of available modes for the current vehicle type."]
6853    pub number_modes: u8,
6854    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6855    pub mode_index: u8,
6856    #[doc = "Standard mode."]
6857    pub standard_mode: MavStandardMode,
6858    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6860    pub mode_name: [u8; 35],
6861}
6862impl AVAILABLE_MODES_DATA {
6863    pub const ENCODED_LEN: usize = 46usize;
6864    pub const DEFAULT: Self = Self {
6865        custom_mode: 0_u32,
6866        properties: MavModeProperty::DEFAULT,
6867        number_modes: 0_u8,
6868        mode_index: 0_u8,
6869        standard_mode: MavStandardMode::DEFAULT,
6870        mode_name: [0_u8; 35usize],
6871    };
6872    #[cfg(feature = "arbitrary")]
6873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6874        use arbitrary::{Arbitrary, Unstructured};
6875        let mut buf = [0u8; 1024];
6876        rng.fill_bytes(&mut buf);
6877        let mut unstructured = Unstructured::new(&buf);
6878        Self::arbitrary(&mut unstructured).unwrap_or_default()
6879    }
6880}
6881impl Default for AVAILABLE_MODES_DATA {
6882    fn default() -> Self {
6883        Self::DEFAULT.clone()
6884    }
6885}
6886impl MessageData for AVAILABLE_MODES_DATA {
6887    type Message = MavMessage;
6888    const ID: u32 = 435u32;
6889    const NAME: &'static str = "AVAILABLE_MODES";
6890    const EXTRA_CRC: u8 = 134u8;
6891    const ENCODED_LEN: usize = 46usize;
6892    fn deser(
6893        _version: MavlinkVersion,
6894        __input: &[u8],
6895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6896        let avail_len = __input.len();
6897        let mut payload_buf = [0; Self::ENCODED_LEN];
6898        let mut buf = if avail_len < Self::ENCODED_LEN {
6899            payload_buf[0..avail_len].copy_from_slice(__input);
6900            Bytes::new(&payload_buf)
6901        } else {
6902            Bytes::new(__input)
6903        };
6904        let mut __struct = Self::default();
6905        __struct.custom_mode = buf.get_u32_le();
6906        let tmp = buf.get_u32_le();
6907        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6908            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6909                flag_type: "MavModeProperty",
6910                value: tmp as u32,
6911            })?;
6912        __struct.number_modes = buf.get_u8();
6913        __struct.mode_index = buf.get_u8();
6914        let tmp = buf.get_u8();
6915        __struct.standard_mode =
6916            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6917                enum_type: "MavStandardMode",
6918                value: tmp as u32,
6919            })?;
6920        for v in &mut __struct.mode_name {
6921            let val = buf.get_u8();
6922            *v = val;
6923        }
6924        Ok(__struct)
6925    }
6926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6927        let mut __tmp = BytesMut::new(bytes);
6928        #[allow(clippy::absurd_extreme_comparisons)]
6929        #[allow(unused_comparisons)]
6930        if __tmp.remaining() < Self::ENCODED_LEN {
6931            panic!(
6932                "buffer is too small (need {} bytes, but got {})",
6933                Self::ENCODED_LEN,
6934                __tmp.remaining(),
6935            )
6936        }
6937        __tmp.put_u32_le(self.custom_mode);
6938        __tmp.put_u32_le(self.properties.bits());
6939        __tmp.put_u8(self.number_modes);
6940        __tmp.put_u8(self.mode_index);
6941        __tmp.put_u8(self.standard_mode as u8);
6942        for val in &self.mode_name {
6943            __tmp.put_u8(*val);
6944        }
6945        if matches!(version, MavlinkVersion::V2) {
6946            let len = __tmp.len();
6947            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6948        } else {
6949            __tmp.len()
6950        }
6951    }
6952}
6953#[doc = "id: 437"]
6954#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6955#[derive(Debug, Clone, PartialEq)]
6956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6958pub struct AVAILABLE_MODES_MONITOR_DATA {
6959    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6960    pub seq: u8,
6961}
6962impl AVAILABLE_MODES_MONITOR_DATA {
6963    pub const ENCODED_LEN: usize = 1usize;
6964    pub const DEFAULT: Self = Self { seq: 0_u8 };
6965    #[cfg(feature = "arbitrary")]
6966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6967        use arbitrary::{Arbitrary, Unstructured};
6968        let mut buf = [0u8; 1024];
6969        rng.fill_bytes(&mut buf);
6970        let mut unstructured = Unstructured::new(&buf);
6971        Self::arbitrary(&mut unstructured).unwrap_or_default()
6972    }
6973}
6974impl Default for AVAILABLE_MODES_MONITOR_DATA {
6975    fn default() -> Self {
6976        Self::DEFAULT.clone()
6977    }
6978}
6979impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6980    type Message = MavMessage;
6981    const ID: u32 = 437u32;
6982    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6983    const EXTRA_CRC: u8 = 30u8;
6984    const ENCODED_LEN: usize = 1usize;
6985    fn deser(
6986        _version: MavlinkVersion,
6987        __input: &[u8],
6988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6989        let avail_len = __input.len();
6990        let mut payload_buf = [0; Self::ENCODED_LEN];
6991        let mut buf = if avail_len < Self::ENCODED_LEN {
6992            payload_buf[0..avail_len].copy_from_slice(__input);
6993            Bytes::new(&payload_buf)
6994        } else {
6995            Bytes::new(__input)
6996        };
6997        let mut __struct = Self::default();
6998        __struct.seq = buf.get_u8();
6999        Ok(__struct)
7000    }
7001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7002        let mut __tmp = BytesMut::new(bytes);
7003        #[allow(clippy::absurd_extreme_comparisons)]
7004        #[allow(unused_comparisons)]
7005        if __tmp.remaining() < Self::ENCODED_LEN {
7006            panic!(
7007                "buffer is too small (need {} bytes, but got {})",
7008                Self::ENCODED_LEN,
7009                __tmp.remaining(),
7010            )
7011        }
7012        __tmp.put_u8(self.seq);
7013        if matches!(version, MavlinkVersion::V2) {
7014            let len = __tmp.len();
7015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7016        } else {
7017            __tmp.len()
7018        }
7019    }
7020}
7021#[doc = "id: 372"]
7022#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
7023#[derive(Debug, Clone, PartialEq)]
7024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7026pub struct BATTERY_INFO_DATA {
7027    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
7028    pub discharge_minimum_voltage: f32,
7029    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
7030    pub charging_minimum_voltage: f32,
7031    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
7032    pub resting_minimum_voltage: f32,
7033    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
7034    pub charging_maximum_voltage: f32,
7035    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
7036    pub charging_maximum_current: f32,
7037    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
7038    pub nominal_voltage: f32,
7039    #[doc = "Maximum pack discharge current. 0: field not provided."]
7040    pub discharge_maximum_current: f32,
7041    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
7042    pub discharge_maximum_burst_current: f32,
7043    #[doc = "Fully charged design capacity. 0: field not provided."]
7044    pub design_capacity: f32,
7045    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
7046    pub full_charge_capacity: f32,
7047    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
7048    pub cycle_count: u16,
7049    #[doc = "Battery weight. 0: field not provided."]
7050    pub weight: u16,
7051    #[doc = "Battery ID"]
7052    pub id: u8,
7053    #[doc = "Function of the battery."]
7054    pub battery_function: MavBatteryFunction,
7055    #[doc = "Type (chemistry) of the battery."]
7056    pub mavtype: MavBatteryType,
7057    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
7058    pub state_of_health: u8,
7059    #[doc = "Number of battery cells in series. 0: field not provided."]
7060    pub cells_in_series: u8,
7061    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
7062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7063    pub manufacture_date: [u8; 9],
7064    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
7065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7066    pub serial_number: [u8; 32],
7067    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
7068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7069    pub name: [u8; 50],
7070}
7071impl BATTERY_INFO_DATA {
7072    pub const ENCODED_LEN: usize = 140usize;
7073    pub const DEFAULT: Self = Self {
7074        discharge_minimum_voltage: 0.0_f32,
7075        charging_minimum_voltage: 0.0_f32,
7076        resting_minimum_voltage: 0.0_f32,
7077        charging_maximum_voltage: 0.0_f32,
7078        charging_maximum_current: 0.0_f32,
7079        nominal_voltage: 0.0_f32,
7080        discharge_maximum_current: 0.0_f32,
7081        discharge_maximum_burst_current: 0.0_f32,
7082        design_capacity: 0.0_f32,
7083        full_charge_capacity: 0.0_f32,
7084        cycle_count: 0_u16,
7085        weight: 0_u16,
7086        id: 0_u8,
7087        battery_function: MavBatteryFunction::DEFAULT,
7088        mavtype: MavBatteryType::DEFAULT,
7089        state_of_health: 0_u8,
7090        cells_in_series: 0_u8,
7091        manufacture_date: [0_u8; 9usize],
7092        serial_number: [0_u8; 32usize],
7093        name: [0_u8; 50usize],
7094    };
7095    #[cfg(feature = "arbitrary")]
7096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7097        use arbitrary::{Arbitrary, Unstructured};
7098        let mut buf = [0u8; 1024];
7099        rng.fill_bytes(&mut buf);
7100        let mut unstructured = Unstructured::new(&buf);
7101        Self::arbitrary(&mut unstructured).unwrap_or_default()
7102    }
7103}
7104impl Default for BATTERY_INFO_DATA {
7105    fn default() -> Self {
7106        Self::DEFAULT.clone()
7107    }
7108}
7109impl MessageData for BATTERY_INFO_DATA {
7110    type Message = MavMessage;
7111    const ID: u32 = 372u32;
7112    const NAME: &'static str = "BATTERY_INFO";
7113    const EXTRA_CRC: u8 = 26u8;
7114    const ENCODED_LEN: usize = 140usize;
7115    fn deser(
7116        _version: MavlinkVersion,
7117        __input: &[u8],
7118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7119        let avail_len = __input.len();
7120        let mut payload_buf = [0; Self::ENCODED_LEN];
7121        let mut buf = if avail_len < Self::ENCODED_LEN {
7122            payload_buf[0..avail_len].copy_from_slice(__input);
7123            Bytes::new(&payload_buf)
7124        } else {
7125            Bytes::new(__input)
7126        };
7127        let mut __struct = Self::default();
7128        __struct.discharge_minimum_voltage = buf.get_f32_le();
7129        __struct.charging_minimum_voltage = buf.get_f32_le();
7130        __struct.resting_minimum_voltage = buf.get_f32_le();
7131        __struct.charging_maximum_voltage = buf.get_f32_le();
7132        __struct.charging_maximum_current = buf.get_f32_le();
7133        __struct.nominal_voltage = buf.get_f32_le();
7134        __struct.discharge_maximum_current = buf.get_f32_le();
7135        __struct.discharge_maximum_burst_current = buf.get_f32_le();
7136        __struct.design_capacity = buf.get_f32_le();
7137        __struct.full_charge_capacity = buf.get_f32_le();
7138        __struct.cycle_count = buf.get_u16_le();
7139        __struct.weight = buf.get_u16_le();
7140        __struct.id = buf.get_u8();
7141        let tmp = buf.get_u8();
7142        __struct.battery_function =
7143            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7144                enum_type: "MavBatteryFunction",
7145                value: tmp as u32,
7146            })?;
7147        let tmp = buf.get_u8();
7148        __struct.mavtype =
7149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7150                enum_type: "MavBatteryType",
7151                value: tmp as u32,
7152            })?;
7153        __struct.state_of_health = buf.get_u8();
7154        __struct.cells_in_series = buf.get_u8();
7155        for v in &mut __struct.manufacture_date {
7156            let val = buf.get_u8();
7157            *v = val;
7158        }
7159        for v in &mut __struct.serial_number {
7160            let val = buf.get_u8();
7161            *v = val;
7162        }
7163        for v in &mut __struct.name {
7164            let val = buf.get_u8();
7165            *v = val;
7166        }
7167        Ok(__struct)
7168    }
7169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7170        let mut __tmp = BytesMut::new(bytes);
7171        #[allow(clippy::absurd_extreme_comparisons)]
7172        #[allow(unused_comparisons)]
7173        if __tmp.remaining() < Self::ENCODED_LEN {
7174            panic!(
7175                "buffer is too small (need {} bytes, but got {})",
7176                Self::ENCODED_LEN,
7177                __tmp.remaining(),
7178            )
7179        }
7180        __tmp.put_f32_le(self.discharge_minimum_voltage);
7181        __tmp.put_f32_le(self.charging_minimum_voltage);
7182        __tmp.put_f32_le(self.resting_minimum_voltage);
7183        __tmp.put_f32_le(self.charging_maximum_voltage);
7184        __tmp.put_f32_le(self.charging_maximum_current);
7185        __tmp.put_f32_le(self.nominal_voltage);
7186        __tmp.put_f32_le(self.discharge_maximum_current);
7187        __tmp.put_f32_le(self.discharge_maximum_burst_current);
7188        __tmp.put_f32_le(self.design_capacity);
7189        __tmp.put_f32_le(self.full_charge_capacity);
7190        __tmp.put_u16_le(self.cycle_count);
7191        __tmp.put_u16_le(self.weight);
7192        __tmp.put_u8(self.id);
7193        __tmp.put_u8(self.battery_function as u8);
7194        __tmp.put_u8(self.mavtype as u8);
7195        __tmp.put_u8(self.state_of_health);
7196        __tmp.put_u8(self.cells_in_series);
7197        for val in &self.manufacture_date {
7198            __tmp.put_u8(*val);
7199        }
7200        for val in &self.serial_number {
7201            __tmp.put_u8(*val);
7202        }
7203        for val in &self.name {
7204            __tmp.put_u8(*val);
7205        }
7206        if matches!(version, MavlinkVersion::V2) {
7207            let len = __tmp.len();
7208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7209        } else {
7210            __tmp.len()
7211        }
7212    }
7213}
7214#[doc = "id: 147"]
7215#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
7216#[derive(Debug, Clone, PartialEq)]
7217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7219pub struct BATTERY_STATUS_DATA {
7220    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
7221    pub current_consumed: i32,
7222    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
7223    pub energy_consumed: i32,
7224    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
7225    pub temperature: i16,
7226    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
7227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7228    pub voltages: [u16; 10],
7229    #[doc = "Battery current, -1: autopilot does not measure the current"]
7230    pub current_battery: i16,
7231    #[doc = "Battery ID"]
7232    pub id: u8,
7233    #[doc = "Function of the battery"]
7234    pub battery_function: MavBatteryFunction,
7235    #[doc = "Type (chemistry) of the battery"]
7236    pub mavtype: MavBatteryType,
7237    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
7238    pub battery_remaining: i8,
7239    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
7240    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7241    pub time_remaining: i32,
7242    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
7243    #[cfg_attr(feature = "serde", serde(default))]
7244    pub charge_state: MavBatteryChargeState,
7245    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
7246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7248    pub voltages_ext: [u16; 4],
7249    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
7250    #[cfg_attr(feature = "serde", serde(default))]
7251    pub mode: MavBatteryMode,
7252    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
7253    #[cfg_attr(feature = "serde", serde(default))]
7254    pub fault_bitmask: MavBatteryFault,
7255}
7256impl BATTERY_STATUS_DATA {
7257    pub const ENCODED_LEN: usize = 54usize;
7258    pub const DEFAULT: Self = Self {
7259        current_consumed: 0_i32,
7260        energy_consumed: 0_i32,
7261        temperature: 0_i16,
7262        voltages: [0_u16; 10usize],
7263        current_battery: 0_i16,
7264        id: 0_u8,
7265        battery_function: MavBatteryFunction::DEFAULT,
7266        mavtype: MavBatteryType::DEFAULT,
7267        battery_remaining: 0_i8,
7268        time_remaining: 0_i32,
7269        charge_state: MavBatteryChargeState::DEFAULT,
7270        voltages_ext: [0_u16; 4usize],
7271        mode: MavBatteryMode::DEFAULT,
7272        fault_bitmask: MavBatteryFault::DEFAULT,
7273    };
7274    #[cfg(feature = "arbitrary")]
7275    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7276        use arbitrary::{Arbitrary, Unstructured};
7277        let mut buf = [0u8; 1024];
7278        rng.fill_bytes(&mut buf);
7279        let mut unstructured = Unstructured::new(&buf);
7280        Self::arbitrary(&mut unstructured).unwrap_or_default()
7281    }
7282}
7283impl Default for BATTERY_STATUS_DATA {
7284    fn default() -> Self {
7285        Self::DEFAULT.clone()
7286    }
7287}
7288impl MessageData for BATTERY_STATUS_DATA {
7289    type Message = MavMessage;
7290    const ID: u32 = 147u32;
7291    const NAME: &'static str = "BATTERY_STATUS";
7292    const EXTRA_CRC: u8 = 154u8;
7293    const ENCODED_LEN: usize = 54usize;
7294    fn deser(
7295        _version: MavlinkVersion,
7296        __input: &[u8],
7297    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7298        let avail_len = __input.len();
7299        let mut payload_buf = [0; Self::ENCODED_LEN];
7300        let mut buf = if avail_len < Self::ENCODED_LEN {
7301            payload_buf[0..avail_len].copy_from_slice(__input);
7302            Bytes::new(&payload_buf)
7303        } else {
7304            Bytes::new(__input)
7305        };
7306        let mut __struct = Self::default();
7307        __struct.current_consumed = buf.get_i32_le();
7308        __struct.energy_consumed = buf.get_i32_le();
7309        __struct.temperature = buf.get_i16_le();
7310        for v in &mut __struct.voltages {
7311            let val = buf.get_u16_le();
7312            *v = val;
7313        }
7314        __struct.current_battery = buf.get_i16_le();
7315        __struct.id = buf.get_u8();
7316        let tmp = buf.get_u8();
7317        __struct.battery_function =
7318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7319                enum_type: "MavBatteryFunction",
7320                value: tmp as u32,
7321            })?;
7322        let tmp = buf.get_u8();
7323        __struct.mavtype =
7324            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7325                enum_type: "MavBatteryType",
7326                value: tmp as u32,
7327            })?;
7328        __struct.battery_remaining = buf.get_i8();
7329        __struct.time_remaining = buf.get_i32_le();
7330        let tmp = buf.get_u8();
7331        __struct.charge_state =
7332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7333                enum_type: "MavBatteryChargeState",
7334                value: tmp as u32,
7335            })?;
7336        for v in &mut __struct.voltages_ext {
7337            let val = buf.get_u16_le();
7338            *v = val;
7339        }
7340        let tmp = buf.get_u8();
7341        __struct.mode =
7342            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7343                enum_type: "MavBatteryMode",
7344                value: tmp as u32,
7345            })?;
7346        let tmp = buf.get_u32_le();
7347        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
7348            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7349                flag_type: "MavBatteryFault",
7350                value: tmp as u32,
7351            })?;
7352        Ok(__struct)
7353    }
7354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7355        let mut __tmp = BytesMut::new(bytes);
7356        #[allow(clippy::absurd_extreme_comparisons)]
7357        #[allow(unused_comparisons)]
7358        if __tmp.remaining() < Self::ENCODED_LEN {
7359            panic!(
7360                "buffer is too small (need {} bytes, but got {})",
7361                Self::ENCODED_LEN,
7362                __tmp.remaining(),
7363            )
7364        }
7365        __tmp.put_i32_le(self.current_consumed);
7366        __tmp.put_i32_le(self.energy_consumed);
7367        __tmp.put_i16_le(self.temperature);
7368        for val in &self.voltages {
7369            __tmp.put_u16_le(*val);
7370        }
7371        __tmp.put_i16_le(self.current_battery);
7372        __tmp.put_u8(self.id);
7373        __tmp.put_u8(self.battery_function as u8);
7374        __tmp.put_u8(self.mavtype as u8);
7375        __tmp.put_i8(self.battery_remaining);
7376        __tmp.put_i32_le(self.time_remaining);
7377        __tmp.put_u8(self.charge_state as u8);
7378        for val in &self.voltages_ext {
7379            __tmp.put_u16_le(*val);
7380        }
7381        __tmp.put_u8(self.mode as u8);
7382        __tmp.put_u32_le(self.fault_bitmask.bits());
7383        if matches!(version, MavlinkVersion::V2) {
7384            let len = __tmp.len();
7385            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7386        } else {
7387            __tmp.len()
7388        }
7389    }
7390}
7391#[doc = "id: 257"]
7392#[doc = "Report button state change."]
7393#[derive(Debug, Clone, PartialEq)]
7394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7396pub struct BUTTON_CHANGE_DATA {
7397    #[doc = "Timestamp (time since system boot)."]
7398    pub time_boot_ms: u32,
7399    #[doc = "Time of last change of button state."]
7400    pub last_change_ms: u32,
7401    #[doc = "Bitmap for state of buttons."]
7402    pub state: u8,
7403}
7404impl BUTTON_CHANGE_DATA {
7405    pub const ENCODED_LEN: usize = 9usize;
7406    pub const DEFAULT: Self = Self {
7407        time_boot_ms: 0_u32,
7408        last_change_ms: 0_u32,
7409        state: 0_u8,
7410    };
7411    #[cfg(feature = "arbitrary")]
7412    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7413        use arbitrary::{Arbitrary, Unstructured};
7414        let mut buf = [0u8; 1024];
7415        rng.fill_bytes(&mut buf);
7416        let mut unstructured = Unstructured::new(&buf);
7417        Self::arbitrary(&mut unstructured).unwrap_or_default()
7418    }
7419}
7420impl Default for BUTTON_CHANGE_DATA {
7421    fn default() -> Self {
7422        Self::DEFAULT.clone()
7423    }
7424}
7425impl MessageData for BUTTON_CHANGE_DATA {
7426    type Message = MavMessage;
7427    const ID: u32 = 257u32;
7428    const NAME: &'static str = "BUTTON_CHANGE";
7429    const EXTRA_CRC: u8 = 131u8;
7430    const ENCODED_LEN: usize = 9usize;
7431    fn deser(
7432        _version: MavlinkVersion,
7433        __input: &[u8],
7434    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7435        let avail_len = __input.len();
7436        let mut payload_buf = [0; Self::ENCODED_LEN];
7437        let mut buf = if avail_len < Self::ENCODED_LEN {
7438            payload_buf[0..avail_len].copy_from_slice(__input);
7439            Bytes::new(&payload_buf)
7440        } else {
7441            Bytes::new(__input)
7442        };
7443        let mut __struct = Self::default();
7444        __struct.time_boot_ms = buf.get_u32_le();
7445        __struct.last_change_ms = buf.get_u32_le();
7446        __struct.state = buf.get_u8();
7447        Ok(__struct)
7448    }
7449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7450        let mut __tmp = BytesMut::new(bytes);
7451        #[allow(clippy::absurd_extreme_comparisons)]
7452        #[allow(unused_comparisons)]
7453        if __tmp.remaining() < Self::ENCODED_LEN {
7454            panic!(
7455                "buffer is too small (need {} bytes, but got {})",
7456                Self::ENCODED_LEN,
7457                __tmp.remaining(),
7458            )
7459        }
7460        __tmp.put_u32_le(self.time_boot_ms);
7461        __tmp.put_u32_le(self.last_change_ms);
7462        __tmp.put_u8(self.state);
7463        if matches!(version, MavlinkVersion::V2) {
7464            let len = __tmp.len();
7465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7466        } else {
7467            __tmp.len()
7468        }
7469    }
7470}
7471#[doc = "id: 262"]
7472#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7473#[derive(Debug, Clone, PartialEq)]
7474#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7476pub struct CAMERA_CAPTURE_STATUS_DATA {
7477    #[doc = "Timestamp (time since system boot)."]
7478    pub time_boot_ms: u32,
7479    #[doc = "Image capture interval"]
7480    pub image_interval: f32,
7481    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7482    pub recording_time_ms: u32,
7483    #[doc = "Available storage capacity."]
7484    pub available_capacity: f32,
7485    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7486    pub image_status: u8,
7487    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7488    pub video_status: u8,
7489    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7491    pub image_count: i32,
7492    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7493    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7494    pub camera_device_id: u8,
7495}
7496impl CAMERA_CAPTURE_STATUS_DATA {
7497    pub const ENCODED_LEN: usize = 23usize;
7498    pub const DEFAULT: Self = Self {
7499        time_boot_ms: 0_u32,
7500        image_interval: 0.0_f32,
7501        recording_time_ms: 0_u32,
7502        available_capacity: 0.0_f32,
7503        image_status: 0_u8,
7504        video_status: 0_u8,
7505        image_count: 0_i32,
7506        camera_device_id: 0_u8,
7507    };
7508    #[cfg(feature = "arbitrary")]
7509    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7510        use arbitrary::{Arbitrary, Unstructured};
7511        let mut buf = [0u8; 1024];
7512        rng.fill_bytes(&mut buf);
7513        let mut unstructured = Unstructured::new(&buf);
7514        Self::arbitrary(&mut unstructured).unwrap_or_default()
7515    }
7516}
7517impl Default for CAMERA_CAPTURE_STATUS_DATA {
7518    fn default() -> Self {
7519        Self::DEFAULT.clone()
7520    }
7521}
7522impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7523    type Message = MavMessage;
7524    const ID: u32 = 262u32;
7525    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7526    const EXTRA_CRC: u8 = 12u8;
7527    const ENCODED_LEN: usize = 23usize;
7528    fn deser(
7529        _version: MavlinkVersion,
7530        __input: &[u8],
7531    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7532        let avail_len = __input.len();
7533        let mut payload_buf = [0; Self::ENCODED_LEN];
7534        let mut buf = if avail_len < Self::ENCODED_LEN {
7535            payload_buf[0..avail_len].copy_from_slice(__input);
7536            Bytes::new(&payload_buf)
7537        } else {
7538            Bytes::new(__input)
7539        };
7540        let mut __struct = Self::default();
7541        __struct.time_boot_ms = buf.get_u32_le();
7542        __struct.image_interval = buf.get_f32_le();
7543        __struct.recording_time_ms = buf.get_u32_le();
7544        __struct.available_capacity = buf.get_f32_le();
7545        __struct.image_status = buf.get_u8();
7546        __struct.video_status = buf.get_u8();
7547        __struct.image_count = buf.get_i32_le();
7548        __struct.camera_device_id = buf.get_u8();
7549        Ok(__struct)
7550    }
7551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7552        let mut __tmp = BytesMut::new(bytes);
7553        #[allow(clippy::absurd_extreme_comparisons)]
7554        #[allow(unused_comparisons)]
7555        if __tmp.remaining() < Self::ENCODED_LEN {
7556            panic!(
7557                "buffer is too small (need {} bytes, but got {})",
7558                Self::ENCODED_LEN,
7559                __tmp.remaining(),
7560            )
7561        }
7562        __tmp.put_u32_le(self.time_boot_ms);
7563        __tmp.put_f32_le(self.image_interval);
7564        __tmp.put_u32_le(self.recording_time_ms);
7565        __tmp.put_f32_le(self.available_capacity);
7566        __tmp.put_u8(self.image_status);
7567        __tmp.put_u8(self.video_status);
7568        __tmp.put_i32_le(self.image_count);
7569        __tmp.put_u8(self.camera_device_id);
7570        if matches!(version, MavlinkVersion::V2) {
7571            let len = __tmp.len();
7572            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7573        } else {
7574            __tmp.len()
7575        }
7576    }
7577}
7578#[doc = "id: 271"]
7579#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7580#[derive(Debug, Clone, PartialEq)]
7581#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7583pub struct CAMERA_FOV_STATUS_DATA {
7584    #[doc = "Timestamp (time since system boot)."]
7585    pub time_boot_ms: u32,
7586    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7587    pub lat_camera: i32,
7588    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7589    pub lon_camera: i32,
7590    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7591    pub alt_camera: i32,
7592    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7593    pub lat_image: i32,
7594    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7595    pub lon_image: i32,
7596    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7597    pub alt_image: i32,
7598    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7600    pub q: [f32; 4],
7601    #[doc = "Horizontal field of view (NaN if unknown)."]
7602    pub hfov: f32,
7603    #[doc = "Vertical field of view (NaN if unknown)."]
7604    pub vfov: f32,
7605    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7606    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7607    pub camera_device_id: u8,
7608}
7609impl CAMERA_FOV_STATUS_DATA {
7610    pub const ENCODED_LEN: usize = 53usize;
7611    pub const DEFAULT: Self = Self {
7612        time_boot_ms: 0_u32,
7613        lat_camera: 0_i32,
7614        lon_camera: 0_i32,
7615        alt_camera: 0_i32,
7616        lat_image: 0_i32,
7617        lon_image: 0_i32,
7618        alt_image: 0_i32,
7619        q: [0.0_f32; 4usize],
7620        hfov: 0.0_f32,
7621        vfov: 0.0_f32,
7622        camera_device_id: 0_u8,
7623    };
7624    #[cfg(feature = "arbitrary")]
7625    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7626        use arbitrary::{Arbitrary, Unstructured};
7627        let mut buf = [0u8; 1024];
7628        rng.fill_bytes(&mut buf);
7629        let mut unstructured = Unstructured::new(&buf);
7630        Self::arbitrary(&mut unstructured).unwrap_or_default()
7631    }
7632}
7633impl Default for CAMERA_FOV_STATUS_DATA {
7634    fn default() -> Self {
7635        Self::DEFAULT.clone()
7636    }
7637}
7638impl MessageData for CAMERA_FOV_STATUS_DATA {
7639    type Message = MavMessage;
7640    const ID: u32 = 271u32;
7641    const NAME: &'static str = "CAMERA_FOV_STATUS";
7642    const EXTRA_CRC: u8 = 22u8;
7643    const ENCODED_LEN: usize = 53usize;
7644    fn deser(
7645        _version: MavlinkVersion,
7646        __input: &[u8],
7647    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7648        let avail_len = __input.len();
7649        let mut payload_buf = [0; Self::ENCODED_LEN];
7650        let mut buf = if avail_len < Self::ENCODED_LEN {
7651            payload_buf[0..avail_len].copy_from_slice(__input);
7652            Bytes::new(&payload_buf)
7653        } else {
7654            Bytes::new(__input)
7655        };
7656        let mut __struct = Self::default();
7657        __struct.time_boot_ms = buf.get_u32_le();
7658        __struct.lat_camera = buf.get_i32_le();
7659        __struct.lon_camera = buf.get_i32_le();
7660        __struct.alt_camera = buf.get_i32_le();
7661        __struct.lat_image = buf.get_i32_le();
7662        __struct.lon_image = buf.get_i32_le();
7663        __struct.alt_image = buf.get_i32_le();
7664        for v in &mut __struct.q {
7665            let val = buf.get_f32_le();
7666            *v = val;
7667        }
7668        __struct.hfov = buf.get_f32_le();
7669        __struct.vfov = buf.get_f32_le();
7670        __struct.camera_device_id = buf.get_u8();
7671        Ok(__struct)
7672    }
7673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7674        let mut __tmp = BytesMut::new(bytes);
7675        #[allow(clippy::absurd_extreme_comparisons)]
7676        #[allow(unused_comparisons)]
7677        if __tmp.remaining() < Self::ENCODED_LEN {
7678            panic!(
7679                "buffer is too small (need {} bytes, but got {})",
7680                Self::ENCODED_LEN,
7681                __tmp.remaining(),
7682            )
7683        }
7684        __tmp.put_u32_le(self.time_boot_ms);
7685        __tmp.put_i32_le(self.lat_camera);
7686        __tmp.put_i32_le(self.lon_camera);
7687        __tmp.put_i32_le(self.alt_camera);
7688        __tmp.put_i32_le(self.lat_image);
7689        __tmp.put_i32_le(self.lon_image);
7690        __tmp.put_i32_le(self.alt_image);
7691        for val in &self.q {
7692            __tmp.put_f32_le(*val);
7693        }
7694        __tmp.put_f32_le(self.hfov);
7695        __tmp.put_f32_le(self.vfov);
7696        __tmp.put_u8(self.camera_device_id);
7697        if matches!(version, MavlinkVersion::V2) {
7698            let len = __tmp.len();
7699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7700        } else {
7701            __tmp.len()
7702        }
7703    }
7704}
7705#[doc = "id: 263"]
7706#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7707#[derive(Debug, Clone, PartialEq)]
7708#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7709#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7710pub struct CAMERA_IMAGE_CAPTURED_DATA {
7711    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7712    pub time_utc: u64,
7713    #[doc = "Timestamp (time since system boot)."]
7714    pub time_boot_ms: u32,
7715    #[doc = "Latitude where image was taken"]
7716    pub lat: i32,
7717    #[doc = "Longitude where capture was taken"]
7718    pub lon: i32,
7719    #[doc = "Altitude (MSL) where image was taken"]
7720    pub alt: i32,
7721    #[doc = "Altitude above ground"]
7722    pub relative_alt: i32,
7723    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7725    pub q: [f32; 4],
7726    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7727    pub image_index: i32,
7728    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7729    pub camera_id: u8,
7730    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7731    pub capture_result: i8,
7732    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7733    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7734    pub file_url: [u8; 205],
7735}
7736impl CAMERA_IMAGE_CAPTURED_DATA {
7737    pub const ENCODED_LEN: usize = 255usize;
7738    pub const DEFAULT: Self = Self {
7739        time_utc: 0_u64,
7740        time_boot_ms: 0_u32,
7741        lat: 0_i32,
7742        lon: 0_i32,
7743        alt: 0_i32,
7744        relative_alt: 0_i32,
7745        q: [0.0_f32; 4usize],
7746        image_index: 0_i32,
7747        camera_id: 0_u8,
7748        capture_result: 0_i8,
7749        file_url: [0_u8; 205usize],
7750    };
7751    #[cfg(feature = "arbitrary")]
7752    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7753        use arbitrary::{Arbitrary, Unstructured};
7754        let mut buf = [0u8; 1024];
7755        rng.fill_bytes(&mut buf);
7756        let mut unstructured = Unstructured::new(&buf);
7757        Self::arbitrary(&mut unstructured).unwrap_or_default()
7758    }
7759}
7760impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7761    fn default() -> Self {
7762        Self::DEFAULT.clone()
7763    }
7764}
7765impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7766    type Message = MavMessage;
7767    const ID: u32 = 263u32;
7768    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7769    const EXTRA_CRC: u8 = 133u8;
7770    const ENCODED_LEN: usize = 255usize;
7771    fn deser(
7772        _version: MavlinkVersion,
7773        __input: &[u8],
7774    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7775        let avail_len = __input.len();
7776        let mut payload_buf = [0; Self::ENCODED_LEN];
7777        let mut buf = if avail_len < Self::ENCODED_LEN {
7778            payload_buf[0..avail_len].copy_from_slice(__input);
7779            Bytes::new(&payload_buf)
7780        } else {
7781            Bytes::new(__input)
7782        };
7783        let mut __struct = Self::default();
7784        __struct.time_utc = buf.get_u64_le();
7785        __struct.time_boot_ms = buf.get_u32_le();
7786        __struct.lat = buf.get_i32_le();
7787        __struct.lon = buf.get_i32_le();
7788        __struct.alt = buf.get_i32_le();
7789        __struct.relative_alt = buf.get_i32_le();
7790        for v in &mut __struct.q {
7791            let val = buf.get_f32_le();
7792            *v = val;
7793        }
7794        __struct.image_index = buf.get_i32_le();
7795        __struct.camera_id = buf.get_u8();
7796        __struct.capture_result = buf.get_i8();
7797        for v in &mut __struct.file_url {
7798            let val = buf.get_u8();
7799            *v = val;
7800        }
7801        Ok(__struct)
7802    }
7803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7804        let mut __tmp = BytesMut::new(bytes);
7805        #[allow(clippy::absurd_extreme_comparisons)]
7806        #[allow(unused_comparisons)]
7807        if __tmp.remaining() < Self::ENCODED_LEN {
7808            panic!(
7809                "buffer is too small (need {} bytes, but got {})",
7810                Self::ENCODED_LEN,
7811                __tmp.remaining(),
7812            )
7813        }
7814        __tmp.put_u64_le(self.time_utc);
7815        __tmp.put_u32_le(self.time_boot_ms);
7816        __tmp.put_i32_le(self.lat);
7817        __tmp.put_i32_le(self.lon);
7818        __tmp.put_i32_le(self.alt);
7819        __tmp.put_i32_le(self.relative_alt);
7820        for val in &self.q {
7821            __tmp.put_f32_le(*val);
7822        }
7823        __tmp.put_i32_le(self.image_index);
7824        __tmp.put_u8(self.camera_id);
7825        __tmp.put_i8(self.capture_result);
7826        for val in &self.file_url {
7827            __tmp.put_u8(*val);
7828        }
7829        if matches!(version, MavlinkVersion::V2) {
7830            let len = __tmp.len();
7831            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7832        } else {
7833            __tmp.len()
7834        }
7835    }
7836}
7837#[doc = "id: 259"]
7838#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7839#[derive(Debug, Clone, PartialEq)]
7840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7842pub struct CAMERA_INFORMATION_DATA {
7843    #[doc = "Timestamp (time since system boot)."]
7844    pub time_boot_ms: u32,
7845    #[doc = "0xff). Use 0 if not known."]
7846    pub firmware_version: u32,
7847    #[doc = "Focal length. Use NaN if not known."]
7848    pub focal_length: f32,
7849    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7850    pub sensor_size_h: f32,
7851    #[doc = "Image sensor size vertical. Use NaN if not known."]
7852    pub sensor_size_v: f32,
7853    #[doc = "Bitmap of camera capability flags."]
7854    pub flags: CameraCapFlags,
7855    #[doc = "Horizontal image resolution. Use 0 if not known."]
7856    pub resolution_h: u16,
7857    #[doc = "Vertical image resolution. Use 0 if not known."]
7858    pub resolution_v: u16,
7859    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7860    pub cam_definition_version: u16,
7861    #[doc = "Name of the camera vendor"]
7862    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7863    pub vendor_name: [u8; 32],
7864    #[doc = "Name of the camera model"]
7865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7866    pub model_name: [u8; 32],
7867    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7868    pub lens_id: u8,
7869    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7870    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7871    pub cam_definition_uri: [u8; 140],
7872    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7873    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7874    pub gimbal_device_id: u8,
7875    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7876    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7877    pub camera_device_id: u8,
7878}
7879impl CAMERA_INFORMATION_DATA {
7880    pub const ENCODED_LEN: usize = 237usize;
7881    pub const DEFAULT: Self = Self {
7882        time_boot_ms: 0_u32,
7883        firmware_version: 0_u32,
7884        focal_length: 0.0_f32,
7885        sensor_size_h: 0.0_f32,
7886        sensor_size_v: 0.0_f32,
7887        flags: CameraCapFlags::DEFAULT,
7888        resolution_h: 0_u16,
7889        resolution_v: 0_u16,
7890        cam_definition_version: 0_u16,
7891        vendor_name: [0_u8; 32usize],
7892        model_name: [0_u8; 32usize],
7893        lens_id: 0_u8,
7894        cam_definition_uri: [0_u8; 140usize],
7895        gimbal_device_id: 0_u8,
7896        camera_device_id: 0_u8,
7897    };
7898    #[cfg(feature = "arbitrary")]
7899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7900        use arbitrary::{Arbitrary, Unstructured};
7901        let mut buf = [0u8; 1024];
7902        rng.fill_bytes(&mut buf);
7903        let mut unstructured = Unstructured::new(&buf);
7904        Self::arbitrary(&mut unstructured).unwrap_or_default()
7905    }
7906}
7907impl Default for CAMERA_INFORMATION_DATA {
7908    fn default() -> Self {
7909        Self::DEFAULT.clone()
7910    }
7911}
7912impl MessageData for CAMERA_INFORMATION_DATA {
7913    type Message = MavMessage;
7914    const ID: u32 = 259u32;
7915    const NAME: &'static str = "CAMERA_INFORMATION";
7916    const EXTRA_CRC: u8 = 92u8;
7917    const ENCODED_LEN: usize = 237usize;
7918    fn deser(
7919        _version: MavlinkVersion,
7920        __input: &[u8],
7921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7922        let avail_len = __input.len();
7923        let mut payload_buf = [0; Self::ENCODED_LEN];
7924        let mut buf = if avail_len < Self::ENCODED_LEN {
7925            payload_buf[0..avail_len].copy_from_slice(__input);
7926            Bytes::new(&payload_buf)
7927        } else {
7928            Bytes::new(__input)
7929        };
7930        let mut __struct = Self::default();
7931        __struct.time_boot_ms = buf.get_u32_le();
7932        __struct.firmware_version = buf.get_u32_le();
7933        __struct.focal_length = buf.get_f32_le();
7934        __struct.sensor_size_h = buf.get_f32_le();
7935        __struct.sensor_size_v = buf.get_f32_le();
7936        let tmp = buf.get_u32_le();
7937        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7938            ::mavlink_core::error::ParserError::InvalidFlag {
7939                flag_type: "CameraCapFlags",
7940                value: tmp as u32,
7941            },
7942        )?;
7943        __struct.resolution_h = buf.get_u16_le();
7944        __struct.resolution_v = buf.get_u16_le();
7945        __struct.cam_definition_version = buf.get_u16_le();
7946        for v in &mut __struct.vendor_name {
7947            let val = buf.get_u8();
7948            *v = val;
7949        }
7950        for v in &mut __struct.model_name {
7951            let val = buf.get_u8();
7952            *v = val;
7953        }
7954        __struct.lens_id = buf.get_u8();
7955        for v in &mut __struct.cam_definition_uri {
7956            let val = buf.get_u8();
7957            *v = val;
7958        }
7959        __struct.gimbal_device_id = buf.get_u8();
7960        __struct.camera_device_id = buf.get_u8();
7961        Ok(__struct)
7962    }
7963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7964        let mut __tmp = BytesMut::new(bytes);
7965        #[allow(clippy::absurd_extreme_comparisons)]
7966        #[allow(unused_comparisons)]
7967        if __tmp.remaining() < Self::ENCODED_LEN {
7968            panic!(
7969                "buffer is too small (need {} bytes, but got {})",
7970                Self::ENCODED_LEN,
7971                __tmp.remaining(),
7972            )
7973        }
7974        __tmp.put_u32_le(self.time_boot_ms);
7975        __tmp.put_u32_le(self.firmware_version);
7976        __tmp.put_f32_le(self.focal_length);
7977        __tmp.put_f32_le(self.sensor_size_h);
7978        __tmp.put_f32_le(self.sensor_size_v);
7979        __tmp.put_u32_le(self.flags.bits());
7980        __tmp.put_u16_le(self.resolution_h);
7981        __tmp.put_u16_le(self.resolution_v);
7982        __tmp.put_u16_le(self.cam_definition_version);
7983        for val in &self.vendor_name {
7984            __tmp.put_u8(*val);
7985        }
7986        for val in &self.model_name {
7987            __tmp.put_u8(*val);
7988        }
7989        __tmp.put_u8(self.lens_id);
7990        for val in &self.cam_definition_uri {
7991            __tmp.put_u8(*val);
7992        }
7993        __tmp.put_u8(self.gimbal_device_id);
7994        __tmp.put_u8(self.camera_device_id);
7995        if matches!(version, MavlinkVersion::V2) {
7996            let len = __tmp.len();
7997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7998        } else {
7999            __tmp.len()
8000        }
8001    }
8002}
8003#[doc = "id: 260"]
8004#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
8005#[derive(Debug, Clone, PartialEq)]
8006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8008pub struct CAMERA_SETTINGS_DATA {
8009    #[doc = "Timestamp (time since system boot)."]
8010    pub time_boot_ms: u32,
8011    #[doc = "Camera mode"]
8012    pub mode_id: CameraMode,
8013    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8014    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8015    pub zoomLevel: f32,
8016    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
8017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8018    pub focusLevel: f32,
8019    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8021    pub camera_device_id: u8,
8022}
8023impl CAMERA_SETTINGS_DATA {
8024    pub const ENCODED_LEN: usize = 14usize;
8025    pub const DEFAULT: Self = Self {
8026        time_boot_ms: 0_u32,
8027        mode_id: CameraMode::DEFAULT,
8028        zoomLevel: 0.0_f32,
8029        focusLevel: 0.0_f32,
8030        camera_device_id: 0_u8,
8031    };
8032    #[cfg(feature = "arbitrary")]
8033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8034        use arbitrary::{Arbitrary, Unstructured};
8035        let mut buf = [0u8; 1024];
8036        rng.fill_bytes(&mut buf);
8037        let mut unstructured = Unstructured::new(&buf);
8038        Self::arbitrary(&mut unstructured).unwrap_or_default()
8039    }
8040}
8041impl Default for CAMERA_SETTINGS_DATA {
8042    fn default() -> Self {
8043        Self::DEFAULT.clone()
8044    }
8045}
8046impl MessageData for CAMERA_SETTINGS_DATA {
8047    type Message = MavMessage;
8048    const ID: u32 = 260u32;
8049    const NAME: &'static str = "CAMERA_SETTINGS";
8050    const EXTRA_CRC: u8 = 146u8;
8051    const ENCODED_LEN: usize = 14usize;
8052    fn deser(
8053        _version: MavlinkVersion,
8054        __input: &[u8],
8055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8056        let avail_len = __input.len();
8057        let mut payload_buf = [0; Self::ENCODED_LEN];
8058        let mut buf = if avail_len < Self::ENCODED_LEN {
8059            payload_buf[0..avail_len].copy_from_slice(__input);
8060            Bytes::new(&payload_buf)
8061        } else {
8062            Bytes::new(__input)
8063        };
8064        let mut __struct = Self::default();
8065        __struct.time_boot_ms = buf.get_u32_le();
8066        let tmp = buf.get_u8();
8067        __struct.mode_id =
8068            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8069                enum_type: "CameraMode",
8070                value: tmp as u32,
8071            })?;
8072        __struct.zoomLevel = buf.get_f32_le();
8073        __struct.focusLevel = buf.get_f32_le();
8074        __struct.camera_device_id = buf.get_u8();
8075        Ok(__struct)
8076    }
8077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8078        let mut __tmp = BytesMut::new(bytes);
8079        #[allow(clippy::absurd_extreme_comparisons)]
8080        #[allow(unused_comparisons)]
8081        if __tmp.remaining() < Self::ENCODED_LEN {
8082            panic!(
8083                "buffer is too small (need {} bytes, but got {})",
8084                Self::ENCODED_LEN,
8085                __tmp.remaining(),
8086            )
8087        }
8088        __tmp.put_u32_le(self.time_boot_ms);
8089        __tmp.put_u8(self.mode_id as u8);
8090        __tmp.put_f32_le(self.zoomLevel);
8091        __tmp.put_f32_le(self.focusLevel);
8092        __tmp.put_u8(self.camera_device_id);
8093        if matches!(version, MavlinkVersion::V2) {
8094            let len = __tmp.len();
8095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8096        } else {
8097            __tmp.len()
8098        }
8099    }
8100}
8101#[doc = "id: 277"]
8102#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
8103#[derive(Debug, Clone, PartialEq)]
8104#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8106pub struct CAMERA_THERMAL_RANGE_DATA {
8107    #[doc = "Timestamp (time since system boot)."]
8108    pub time_boot_ms: u32,
8109    #[doc = "Temperature max."]
8110    pub max: f32,
8111    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8112    pub max_point_x: f32,
8113    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8114    pub max_point_y: f32,
8115    #[doc = "Temperature min."]
8116    pub min: f32,
8117    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8118    pub min_point_x: f32,
8119    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8120    pub min_point_y: f32,
8121    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8122    pub stream_id: u8,
8123    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8124    pub camera_device_id: u8,
8125}
8126impl CAMERA_THERMAL_RANGE_DATA {
8127    pub const ENCODED_LEN: usize = 30usize;
8128    pub const DEFAULT: Self = Self {
8129        time_boot_ms: 0_u32,
8130        max: 0.0_f32,
8131        max_point_x: 0.0_f32,
8132        max_point_y: 0.0_f32,
8133        min: 0.0_f32,
8134        min_point_x: 0.0_f32,
8135        min_point_y: 0.0_f32,
8136        stream_id: 0_u8,
8137        camera_device_id: 0_u8,
8138    };
8139    #[cfg(feature = "arbitrary")]
8140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8141        use arbitrary::{Arbitrary, Unstructured};
8142        let mut buf = [0u8; 1024];
8143        rng.fill_bytes(&mut buf);
8144        let mut unstructured = Unstructured::new(&buf);
8145        Self::arbitrary(&mut unstructured).unwrap_or_default()
8146    }
8147}
8148impl Default for CAMERA_THERMAL_RANGE_DATA {
8149    fn default() -> Self {
8150        Self::DEFAULT.clone()
8151    }
8152}
8153impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8154    type Message = MavMessage;
8155    const ID: u32 = 277u32;
8156    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8157    const EXTRA_CRC: u8 = 62u8;
8158    const ENCODED_LEN: usize = 30usize;
8159    fn deser(
8160        _version: MavlinkVersion,
8161        __input: &[u8],
8162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8163        let avail_len = __input.len();
8164        let mut payload_buf = [0; Self::ENCODED_LEN];
8165        let mut buf = if avail_len < Self::ENCODED_LEN {
8166            payload_buf[0..avail_len].copy_from_slice(__input);
8167            Bytes::new(&payload_buf)
8168        } else {
8169            Bytes::new(__input)
8170        };
8171        let mut __struct = Self::default();
8172        __struct.time_boot_ms = buf.get_u32_le();
8173        __struct.max = buf.get_f32_le();
8174        __struct.max_point_x = buf.get_f32_le();
8175        __struct.max_point_y = buf.get_f32_le();
8176        __struct.min = buf.get_f32_le();
8177        __struct.min_point_x = buf.get_f32_le();
8178        __struct.min_point_y = buf.get_f32_le();
8179        __struct.stream_id = buf.get_u8();
8180        __struct.camera_device_id = buf.get_u8();
8181        Ok(__struct)
8182    }
8183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8184        let mut __tmp = BytesMut::new(bytes);
8185        #[allow(clippy::absurd_extreme_comparisons)]
8186        #[allow(unused_comparisons)]
8187        if __tmp.remaining() < Self::ENCODED_LEN {
8188            panic!(
8189                "buffer is too small (need {} bytes, but got {})",
8190                Self::ENCODED_LEN,
8191                __tmp.remaining(),
8192            )
8193        }
8194        __tmp.put_u32_le(self.time_boot_ms);
8195        __tmp.put_f32_le(self.max);
8196        __tmp.put_f32_le(self.max_point_x);
8197        __tmp.put_f32_le(self.max_point_y);
8198        __tmp.put_f32_le(self.min);
8199        __tmp.put_f32_le(self.min_point_x);
8200        __tmp.put_f32_le(self.min_point_y);
8201        __tmp.put_u8(self.stream_id);
8202        __tmp.put_u8(self.camera_device_id);
8203        if matches!(version, MavlinkVersion::V2) {
8204            let len = __tmp.len();
8205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8206        } else {
8207            __tmp.len()
8208        }
8209    }
8210}
8211#[doc = "id: 276"]
8212#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8213#[derive(Debug, Clone, PartialEq)]
8214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8216pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8217    #[doc = "Latitude of tracked object"]
8218    pub lat: i32,
8219    #[doc = "Longitude of tracked object"]
8220    pub lon: i32,
8221    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8222    pub alt: f32,
8223    #[doc = "Horizontal accuracy. NAN if unknown"]
8224    pub h_acc: f32,
8225    #[doc = "Vertical accuracy. NAN if unknown"]
8226    pub v_acc: f32,
8227    #[doc = "North velocity of tracked object. NAN if unknown"]
8228    pub vel_n: f32,
8229    #[doc = "East velocity of tracked object. NAN if unknown"]
8230    pub vel_e: f32,
8231    #[doc = "Down velocity of tracked object. NAN if unknown"]
8232    pub vel_d: f32,
8233    #[doc = "Velocity accuracy. NAN if unknown"]
8234    pub vel_acc: f32,
8235    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8236    pub dist: f32,
8237    #[doc = "Heading in radians, in NED. NAN if unknown"]
8238    pub hdg: f32,
8239    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8240    pub hdg_acc: f32,
8241    #[doc = "Current tracking status"]
8242    pub tracking_status: CameraTrackingStatusFlags,
8243    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8245    pub camera_device_id: u8,
8246}
8247impl CAMERA_TRACKING_GEO_STATUS_DATA {
8248    pub const ENCODED_LEN: usize = 50usize;
8249    pub const DEFAULT: Self = Self {
8250        lat: 0_i32,
8251        lon: 0_i32,
8252        alt: 0.0_f32,
8253        h_acc: 0.0_f32,
8254        v_acc: 0.0_f32,
8255        vel_n: 0.0_f32,
8256        vel_e: 0.0_f32,
8257        vel_d: 0.0_f32,
8258        vel_acc: 0.0_f32,
8259        dist: 0.0_f32,
8260        hdg: 0.0_f32,
8261        hdg_acc: 0.0_f32,
8262        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8263        camera_device_id: 0_u8,
8264    };
8265    #[cfg(feature = "arbitrary")]
8266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8267        use arbitrary::{Arbitrary, Unstructured};
8268        let mut buf = [0u8; 1024];
8269        rng.fill_bytes(&mut buf);
8270        let mut unstructured = Unstructured::new(&buf);
8271        Self::arbitrary(&mut unstructured).unwrap_or_default()
8272    }
8273}
8274impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8275    fn default() -> Self {
8276        Self::DEFAULT.clone()
8277    }
8278}
8279impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8280    type Message = MavMessage;
8281    const ID: u32 = 276u32;
8282    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8283    const EXTRA_CRC: u8 = 18u8;
8284    const ENCODED_LEN: usize = 50usize;
8285    fn deser(
8286        _version: MavlinkVersion,
8287        __input: &[u8],
8288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8289        let avail_len = __input.len();
8290        let mut payload_buf = [0; Self::ENCODED_LEN];
8291        let mut buf = if avail_len < Self::ENCODED_LEN {
8292            payload_buf[0..avail_len].copy_from_slice(__input);
8293            Bytes::new(&payload_buf)
8294        } else {
8295            Bytes::new(__input)
8296        };
8297        let mut __struct = Self::default();
8298        __struct.lat = buf.get_i32_le();
8299        __struct.lon = buf.get_i32_le();
8300        __struct.alt = buf.get_f32_le();
8301        __struct.h_acc = buf.get_f32_le();
8302        __struct.v_acc = buf.get_f32_le();
8303        __struct.vel_n = buf.get_f32_le();
8304        __struct.vel_e = buf.get_f32_le();
8305        __struct.vel_d = buf.get_f32_le();
8306        __struct.vel_acc = buf.get_f32_le();
8307        __struct.dist = buf.get_f32_le();
8308        __struct.hdg = buf.get_f32_le();
8309        __struct.hdg_acc = buf.get_f32_le();
8310        let tmp = buf.get_u8();
8311        __struct.tracking_status =
8312            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8313                enum_type: "CameraTrackingStatusFlags",
8314                value: tmp as u32,
8315            })?;
8316        __struct.camera_device_id = buf.get_u8();
8317        Ok(__struct)
8318    }
8319    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8320        let mut __tmp = BytesMut::new(bytes);
8321        #[allow(clippy::absurd_extreme_comparisons)]
8322        #[allow(unused_comparisons)]
8323        if __tmp.remaining() < Self::ENCODED_LEN {
8324            panic!(
8325                "buffer is too small (need {} bytes, but got {})",
8326                Self::ENCODED_LEN,
8327                __tmp.remaining(),
8328            )
8329        }
8330        __tmp.put_i32_le(self.lat);
8331        __tmp.put_i32_le(self.lon);
8332        __tmp.put_f32_le(self.alt);
8333        __tmp.put_f32_le(self.h_acc);
8334        __tmp.put_f32_le(self.v_acc);
8335        __tmp.put_f32_le(self.vel_n);
8336        __tmp.put_f32_le(self.vel_e);
8337        __tmp.put_f32_le(self.vel_d);
8338        __tmp.put_f32_le(self.vel_acc);
8339        __tmp.put_f32_le(self.dist);
8340        __tmp.put_f32_le(self.hdg);
8341        __tmp.put_f32_le(self.hdg_acc);
8342        __tmp.put_u8(self.tracking_status as u8);
8343        __tmp.put_u8(self.camera_device_id);
8344        if matches!(version, MavlinkVersion::V2) {
8345            let len = __tmp.len();
8346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8347        } else {
8348            __tmp.len()
8349        }
8350    }
8351}
8352#[doc = "id: 275"]
8353#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8354#[derive(Debug, Clone, PartialEq)]
8355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8357pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8358    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8359    pub point_x: f32,
8360    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8361    pub point_y: f32,
8362    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8363    pub radius: f32,
8364    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8365    pub rec_top_x: f32,
8366    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8367    pub rec_top_y: f32,
8368    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8369    pub rec_bottom_x: f32,
8370    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8371    pub rec_bottom_y: f32,
8372    #[doc = "Current tracking status"]
8373    pub tracking_status: CameraTrackingStatusFlags,
8374    #[doc = "Current tracking mode"]
8375    pub tracking_mode: CameraTrackingMode,
8376    #[doc = "Defines location of target data"]
8377    pub target_data: CameraTrackingTargetData,
8378    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8380    pub camera_device_id: u8,
8381}
8382impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8383    pub const ENCODED_LEN: usize = 32usize;
8384    pub const DEFAULT: Self = Self {
8385        point_x: 0.0_f32,
8386        point_y: 0.0_f32,
8387        radius: 0.0_f32,
8388        rec_top_x: 0.0_f32,
8389        rec_top_y: 0.0_f32,
8390        rec_bottom_x: 0.0_f32,
8391        rec_bottom_y: 0.0_f32,
8392        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8393        tracking_mode: CameraTrackingMode::DEFAULT,
8394        target_data: CameraTrackingTargetData::DEFAULT,
8395        camera_device_id: 0_u8,
8396    };
8397    #[cfg(feature = "arbitrary")]
8398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8399        use arbitrary::{Arbitrary, Unstructured};
8400        let mut buf = [0u8; 1024];
8401        rng.fill_bytes(&mut buf);
8402        let mut unstructured = Unstructured::new(&buf);
8403        Self::arbitrary(&mut unstructured).unwrap_or_default()
8404    }
8405}
8406impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8407    fn default() -> Self {
8408        Self::DEFAULT.clone()
8409    }
8410}
8411impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8412    type Message = MavMessage;
8413    const ID: u32 = 275u32;
8414    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8415    const EXTRA_CRC: u8 = 126u8;
8416    const ENCODED_LEN: usize = 32usize;
8417    fn deser(
8418        _version: MavlinkVersion,
8419        __input: &[u8],
8420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8421        let avail_len = __input.len();
8422        let mut payload_buf = [0; Self::ENCODED_LEN];
8423        let mut buf = if avail_len < Self::ENCODED_LEN {
8424            payload_buf[0..avail_len].copy_from_slice(__input);
8425            Bytes::new(&payload_buf)
8426        } else {
8427            Bytes::new(__input)
8428        };
8429        let mut __struct = Self::default();
8430        __struct.point_x = buf.get_f32_le();
8431        __struct.point_y = buf.get_f32_le();
8432        __struct.radius = buf.get_f32_le();
8433        __struct.rec_top_x = buf.get_f32_le();
8434        __struct.rec_top_y = buf.get_f32_le();
8435        __struct.rec_bottom_x = buf.get_f32_le();
8436        __struct.rec_bottom_y = buf.get_f32_le();
8437        let tmp = buf.get_u8();
8438        __struct.tracking_status =
8439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8440                enum_type: "CameraTrackingStatusFlags",
8441                value: tmp as u32,
8442            })?;
8443        let tmp = buf.get_u8();
8444        __struct.tracking_mode =
8445            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8446                enum_type: "CameraTrackingMode",
8447                value: tmp as u32,
8448            })?;
8449        let tmp = buf.get_u8();
8450        __struct.target_data =
8451            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
8452                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8453                    flag_type: "CameraTrackingTargetData",
8454                    value: tmp as u32,
8455                })?;
8456        __struct.camera_device_id = buf.get_u8();
8457        Ok(__struct)
8458    }
8459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8460        let mut __tmp = BytesMut::new(bytes);
8461        #[allow(clippy::absurd_extreme_comparisons)]
8462        #[allow(unused_comparisons)]
8463        if __tmp.remaining() < Self::ENCODED_LEN {
8464            panic!(
8465                "buffer is too small (need {} bytes, but got {})",
8466                Self::ENCODED_LEN,
8467                __tmp.remaining(),
8468            )
8469        }
8470        __tmp.put_f32_le(self.point_x);
8471        __tmp.put_f32_le(self.point_y);
8472        __tmp.put_f32_le(self.radius);
8473        __tmp.put_f32_le(self.rec_top_x);
8474        __tmp.put_f32_le(self.rec_top_y);
8475        __tmp.put_f32_le(self.rec_bottom_x);
8476        __tmp.put_f32_le(self.rec_bottom_y);
8477        __tmp.put_u8(self.tracking_status as u8);
8478        __tmp.put_u8(self.tracking_mode as u8);
8479        __tmp.put_u8(self.target_data.bits());
8480        __tmp.put_u8(self.camera_device_id);
8481        if matches!(version, MavlinkVersion::V2) {
8482            let len = __tmp.len();
8483            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8484        } else {
8485            __tmp.len()
8486        }
8487    }
8488}
8489#[doc = "id: 112"]
8490#[doc = "Camera-IMU triggering and synchronisation message."]
8491#[derive(Debug, Clone, PartialEq)]
8492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8493#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8494pub struct CAMERA_TRIGGER_DATA {
8495    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8496    pub time_usec: u64,
8497    #[doc = "Image frame sequence"]
8498    pub seq: u32,
8499}
8500impl CAMERA_TRIGGER_DATA {
8501    pub const ENCODED_LEN: usize = 12usize;
8502    pub const DEFAULT: Self = Self {
8503        time_usec: 0_u64,
8504        seq: 0_u32,
8505    };
8506    #[cfg(feature = "arbitrary")]
8507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8508        use arbitrary::{Arbitrary, Unstructured};
8509        let mut buf = [0u8; 1024];
8510        rng.fill_bytes(&mut buf);
8511        let mut unstructured = Unstructured::new(&buf);
8512        Self::arbitrary(&mut unstructured).unwrap_or_default()
8513    }
8514}
8515impl Default for CAMERA_TRIGGER_DATA {
8516    fn default() -> Self {
8517        Self::DEFAULT.clone()
8518    }
8519}
8520impl MessageData for CAMERA_TRIGGER_DATA {
8521    type Message = MavMessage;
8522    const ID: u32 = 112u32;
8523    const NAME: &'static str = "CAMERA_TRIGGER";
8524    const EXTRA_CRC: u8 = 174u8;
8525    const ENCODED_LEN: usize = 12usize;
8526    fn deser(
8527        _version: MavlinkVersion,
8528        __input: &[u8],
8529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8530        let avail_len = __input.len();
8531        let mut payload_buf = [0; Self::ENCODED_LEN];
8532        let mut buf = if avail_len < Self::ENCODED_LEN {
8533            payload_buf[0..avail_len].copy_from_slice(__input);
8534            Bytes::new(&payload_buf)
8535        } else {
8536            Bytes::new(__input)
8537        };
8538        let mut __struct = Self::default();
8539        __struct.time_usec = buf.get_u64_le();
8540        __struct.seq = buf.get_u32_le();
8541        Ok(__struct)
8542    }
8543    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8544        let mut __tmp = BytesMut::new(bytes);
8545        #[allow(clippy::absurd_extreme_comparisons)]
8546        #[allow(unused_comparisons)]
8547        if __tmp.remaining() < Self::ENCODED_LEN {
8548            panic!(
8549                "buffer is too small (need {} bytes, but got {})",
8550                Self::ENCODED_LEN,
8551                __tmp.remaining(),
8552            )
8553        }
8554        __tmp.put_u64_le(self.time_usec);
8555        __tmp.put_u32_le(self.seq);
8556        if matches!(version, MavlinkVersion::V2) {
8557            let len = __tmp.len();
8558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8559        } else {
8560            __tmp.len()
8561        }
8562    }
8563}
8564#[doc = "id: 387"]
8565#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8566#[derive(Debug, Clone, PartialEq)]
8567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8569pub struct CANFD_FRAME_DATA {
8570    #[doc = "Frame ID"]
8571    pub id: u32,
8572    #[doc = "System ID."]
8573    pub target_system: u8,
8574    #[doc = "Component ID."]
8575    pub target_component: u8,
8576    #[doc = "bus number"]
8577    pub bus: u8,
8578    #[doc = "Frame length"]
8579    pub len: u8,
8580    #[doc = "Frame data"]
8581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8582    pub data: [u8; 64],
8583}
8584impl CANFD_FRAME_DATA {
8585    pub const ENCODED_LEN: usize = 72usize;
8586    pub const DEFAULT: Self = Self {
8587        id: 0_u32,
8588        target_system: 0_u8,
8589        target_component: 0_u8,
8590        bus: 0_u8,
8591        len: 0_u8,
8592        data: [0_u8; 64usize],
8593    };
8594    #[cfg(feature = "arbitrary")]
8595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8596        use arbitrary::{Arbitrary, Unstructured};
8597        let mut buf = [0u8; 1024];
8598        rng.fill_bytes(&mut buf);
8599        let mut unstructured = Unstructured::new(&buf);
8600        Self::arbitrary(&mut unstructured).unwrap_or_default()
8601    }
8602}
8603impl Default for CANFD_FRAME_DATA {
8604    fn default() -> Self {
8605        Self::DEFAULT.clone()
8606    }
8607}
8608impl MessageData for CANFD_FRAME_DATA {
8609    type Message = MavMessage;
8610    const ID: u32 = 387u32;
8611    const NAME: &'static str = "CANFD_FRAME";
8612    const EXTRA_CRC: u8 = 4u8;
8613    const ENCODED_LEN: usize = 72usize;
8614    fn deser(
8615        _version: MavlinkVersion,
8616        __input: &[u8],
8617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8618        let avail_len = __input.len();
8619        let mut payload_buf = [0; Self::ENCODED_LEN];
8620        let mut buf = if avail_len < Self::ENCODED_LEN {
8621            payload_buf[0..avail_len].copy_from_slice(__input);
8622            Bytes::new(&payload_buf)
8623        } else {
8624            Bytes::new(__input)
8625        };
8626        let mut __struct = Self::default();
8627        __struct.id = buf.get_u32_le();
8628        __struct.target_system = buf.get_u8();
8629        __struct.target_component = buf.get_u8();
8630        __struct.bus = buf.get_u8();
8631        __struct.len = buf.get_u8();
8632        for v in &mut __struct.data {
8633            let val = buf.get_u8();
8634            *v = val;
8635        }
8636        Ok(__struct)
8637    }
8638    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8639        let mut __tmp = BytesMut::new(bytes);
8640        #[allow(clippy::absurd_extreme_comparisons)]
8641        #[allow(unused_comparisons)]
8642        if __tmp.remaining() < Self::ENCODED_LEN {
8643            panic!(
8644                "buffer is too small (need {} bytes, but got {})",
8645                Self::ENCODED_LEN,
8646                __tmp.remaining(),
8647            )
8648        }
8649        __tmp.put_u32_le(self.id);
8650        __tmp.put_u8(self.target_system);
8651        __tmp.put_u8(self.target_component);
8652        __tmp.put_u8(self.bus);
8653        __tmp.put_u8(self.len);
8654        for val in &self.data {
8655            __tmp.put_u8(*val);
8656        }
8657        if matches!(version, MavlinkVersion::V2) {
8658            let len = __tmp.len();
8659            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8660        } else {
8661            __tmp.len()
8662        }
8663    }
8664}
8665#[doc = "id: 388"]
8666#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8667#[derive(Debug, Clone, PartialEq)]
8668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8670pub struct CAN_FILTER_MODIFY_DATA {
8671    #[doc = "filter IDs, length num_ids"]
8672    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8673    pub ids: [u16; 16],
8674    #[doc = "System ID."]
8675    pub target_system: u8,
8676    #[doc = "Component ID."]
8677    pub target_component: u8,
8678    #[doc = "bus number"]
8679    pub bus: u8,
8680    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8681    pub operation: CanFilterOp,
8682    #[doc = "number of IDs in filter list"]
8683    pub num_ids: u8,
8684}
8685impl CAN_FILTER_MODIFY_DATA {
8686    pub const ENCODED_LEN: usize = 37usize;
8687    pub const DEFAULT: Self = Self {
8688        ids: [0_u16; 16usize],
8689        target_system: 0_u8,
8690        target_component: 0_u8,
8691        bus: 0_u8,
8692        operation: CanFilterOp::DEFAULT,
8693        num_ids: 0_u8,
8694    };
8695    #[cfg(feature = "arbitrary")]
8696    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8697        use arbitrary::{Arbitrary, Unstructured};
8698        let mut buf = [0u8; 1024];
8699        rng.fill_bytes(&mut buf);
8700        let mut unstructured = Unstructured::new(&buf);
8701        Self::arbitrary(&mut unstructured).unwrap_or_default()
8702    }
8703}
8704impl Default for CAN_FILTER_MODIFY_DATA {
8705    fn default() -> Self {
8706        Self::DEFAULT.clone()
8707    }
8708}
8709impl MessageData for CAN_FILTER_MODIFY_DATA {
8710    type Message = MavMessage;
8711    const ID: u32 = 388u32;
8712    const NAME: &'static str = "CAN_FILTER_MODIFY";
8713    const EXTRA_CRC: u8 = 8u8;
8714    const ENCODED_LEN: usize = 37usize;
8715    fn deser(
8716        _version: MavlinkVersion,
8717        __input: &[u8],
8718    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8719        let avail_len = __input.len();
8720        let mut payload_buf = [0; Self::ENCODED_LEN];
8721        let mut buf = if avail_len < Self::ENCODED_LEN {
8722            payload_buf[0..avail_len].copy_from_slice(__input);
8723            Bytes::new(&payload_buf)
8724        } else {
8725            Bytes::new(__input)
8726        };
8727        let mut __struct = Self::default();
8728        for v in &mut __struct.ids {
8729            let val = buf.get_u16_le();
8730            *v = val;
8731        }
8732        __struct.target_system = buf.get_u8();
8733        __struct.target_component = buf.get_u8();
8734        __struct.bus = buf.get_u8();
8735        let tmp = buf.get_u8();
8736        __struct.operation =
8737            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8738                enum_type: "CanFilterOp",
8739                value: tmp as u32,
8740            })?;
8741        __struct.num_ids = buf.get_u8();
8742        Ok(__struct)
8743    }
8744    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8745        let mut __tmp = BytesMut::new(bytes);
8746        #[allow(clippy::absurd_extreme_comparisons)]
8747        #[allow(unused_comparisons)]
8748        if __tmp.remaining() < Self::ENCODED_LEN {
8749            panic!(
8750                "buffer is too small (need {} bytes, but got {})",
8751                Self::ENCODED_LEN,
8752                __tmp.remaining(),
8753            )
8754        }
8755        for val in &self.ids {
8756            __tmp.put_u16_le(*val);
8757        }
8758        __tmp.put_u8(self.target_system);
8759        __tmp.put_u8(self.target_component);
8760        __tmp.put_u8(self.bus);
8761        __tmp.put_u8(self.operation as u8);
8762        __tmp.put_u8(self.num_ids);
8763        if matches!(version, MavlinkVersion::V2) {
8764            let len = __tmp.len();
8765            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8766        } else {
8767            __tmp.len()
8768        }
8769    }
8770}
8771#[doc = "id: 386"]
8772#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8773#[derive(Debug, Clone, PartialEq)]
8774#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8775#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8776pub struct CAN_FRAME_DATA {
8777    #[doc = "Frame ID"]
8778    pub id: u32,
8779    #[doc = "System ID."]
8780    pub target_system: u8,
8781    #[doc = "Component ID."]
8782    pub target_component: u8,
8783    #[doc = "Bus number"]
8784    pub bus: u8,
8785    #[doc = "Frame length"]
8786    pub len: u8,
8787    #[doc = "Frame data"]
8788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8789    pub data: [u8; 8],
8790}
8791impl CAN_FRAME_DATA {
8792    pub const ENCODED_LEN: usize = 16usize;
8793    pub const DEFAULT: Self = Self {
8794        id: 0_u32,
8795        target_system: 0_u8,
8796        target_component: 0_u8,
8797        bus: 0_u8,
8798        len: 0_u8,
8799        data: [0_u8; 8usize],
8800    };
8801    #[cfg(feature = "arbitrary")]
8802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8803        use arbitrary::{Arbitrary, Unstructured};
8804        let mut buf = [0u8; 1024];
8805        rng.fill_bytes(&mut buf);
8806        let mut unstructured = Unstructured::new(&buf);
8807        Self::arbitrary(&mut unstructured).unwrap_or_default()
8808    }
8809}
8810impl Default for CAN_FRAME_DATA {
8811    fn default() -> Self {
8812        Self::DEFAULT.clone()
8813    }
8814}
8815impl MessageData for CAN_FRAME_DATA {
8816    type Message = MavMessage;
8817    const ID: u32 = 386u32;
8818    const NAME: &'static str = "CAN_FRAME";
8819    const EXTRA_CRC: u8 = 132u8;
8820    const ENCODED_LEN: usize = 16usize;
8821    fn deser(
8822        _version: MavlinkVersion,
8823        __input: &[u8],
8824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8825        let avail_len = __input.len();
8826        let mut payload_buf = [0; Self::ENCODED_LEN];
8827        let mut buf = if avail_len < Self::ENCODED_LEN {
8828            payload_buf[0..avail_len].copy_from_slice(__input);
8829            Bytes::new(&payload_buf)
8830        } else {
8831            Bytes::new(__input)
8832        };
8833        let mut __struct = Self::default();
8834        __struct.id = buf.get_u32_le();
8835        __struct.target_system = buf.get_u8();
8836        __struct.target_component = buf.get_u8();
8837        __struct.bus = buf.get_u8();
8838        __struct.len = buf.get_u8();
8839        for v in &mut __struct.data {
8840            let val = buf.get_u8();
8841            *v = val;
8842        }
8843        Ok(__struct)
8844    }
8845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8846        let mut __tmp = BytesMut::new(bytes);
8847        #[allow(clippy::absurd_extreme_comparisons)]
8848        #[allow(unused_comparisons)]
8849        if __tmp.remaining() < Self::ENCODED_LEN {
8850            panic!(
8851                "buffer is too small (need {} bytes, but got {})",
8852                Self::ENCODED_LEN,
8853                __tmp.remaining(),
8854            )
8855        }
8856        __tmp.put_u32_le(self.id);
8857        __tmp.put_u8(self.target_system);
8858        __tmp.put_u8(self.target_component);
8859        __tmp.put_u8(self.bus);
8860        __tmp.put_u8(self.len);
8861        for val in &self.data {
8862            __tmp.put_u8(*val);
8863        }
8864        if matches!(version, MavlinkVersion::V2) {
8865            let len = __tmp.len();
8866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8867        } else {
8868            __tmp.len()
8869        }
8870    }
8871}
8872#[doc = "id: 336"]
8873#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8874#[derive(Debug, Clone, PartialEq)]
8875#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8876#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8877pub struct CELLULAR_CONFIG_DATA {
8878    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8879    pub enable_lte: u8,
8880    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8881    pub enable_pin: u8,
8882    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8884    pub pin: [u8; 16],
8885    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8886    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8887    pub new_pin: [u8; 16],
8888    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8889    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8890    pub apn: [u8; 32],
8891    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8892    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8893    pub puk: [u8; 16],
8894    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8895    pub roaming: u8,
8896    #[doc = "Message acceptance response (sent back to GS)."]
8897    pub response: CellularConfigResponse,
8898}
8899impl CELLULAR_CONFIG_DATA {
8900    pub const ENCODED_LEN: usize = 84usize;
8901    pub const DEFAULT: Self = Self {
8902        enable_lte: 0_u8,
8903        enable_pin: 0_u8,
8904        pin: [0_u8; 16usize],
8905        new_pin: [0_u8; 16usize],
8906        apn: [0_u8; 32usize],
8907        puk: [0_u8; 16usize],
8908        roaming: 0_u8,
8909        response: CellularConfigResponse::DEFAULT,
8910    };
8911    #[cfg(feature = "arbitrary")]
8912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8913        use arbitrary::{Arbitrary, Unstructured};
8914        let mut buf = [0u8; 1024];
8915        rng.fill_bytes(&mut buf);
8916        let mut unstructured = Unstructured::new(&buf);
8917        Self::arbitrary(&mut unstructured).unwrap_or_default()
8918    }
8919}
8920impl Default for CELLULAR_CONFIG_DATA {
8921    fn default() -> Self {
8922        Self::DEFAULT.clone()
8923    }
8924}
8925impl MessageData for CELLULAR_CONFIG_DATA {
8926    type Message = MavMessage;
8927    const ID: u32 = 336u32;
8928    const NAME: &'static str = "CELLULAR_CONFIG";
8929    const EXTRA_CRC: u8 = 245u8;
8930    const ENCODED_LEN: usize = 84usize;
8931    fn deser(
8932        _version: MavlinkVersion,
8933        __input: &[u8],
8934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8935        let avail_len = __input.len();
8936        let mut payload_buf = [0; Self::ENCODED_LEN];
8937        let mut buf = if avail_len < Self::ENCODED_LEN {
8938            payload_buf[0..avail_len].copy_from_slice(__input);
8939            Bytes::new(&payload_buf)
8940        } else {
8941            Bytes::new(__input)
8942        };
8943        let mut __struct = Self::default();
8944        __struct.enable_lte = buf.get_u8();
8945        __struct.enable_pin = buf.get_u8();
8946        for v in &mut __struct.pin {
8947            let val = buf.get_u8();
8948            *v = val;
8949        }
8950        for v in &mut __struct.new_pin {
8951            let val = buf.get_u8();
8952            *v = val;
8953        }
8954        for v in &mut __struct.apn {
8955            let val = buf.get_u8();
8956            *v = val;
8957        }
8958        for v in &mut __struct.puk {
8959            let val = buf.get_u8();
8960            *v = val;
8961        }
8962        __struct.roaming = buf.get_u8();
8963        let tmp = buf.get_u8();
8964        __struct.response =
8965            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8966                enum_type: "CellularConfigResponse",
8967                value: tmp as u32,
8968            })?;
8969        Ok(__struct)
8970    }
8971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8972        let mut __tmp = BytesMut::new(bytes);
8973        #[allow(clippy::absurd_extreme_comparisons)]
8974        #[allow(unused_comparisons)]
8975        if __tmp.remaining() < Self::ENCODED_LEN {
8976            panic!(
8977                "buffer is too small (need {} bytes, but got {})",
8978                Self::ENCODED_LEN,
8979                __tmp.remaining(),
8980            )
8981        }
8982        __tmp.put_u8(self.enable_lte);
8983        __tmp.put_u8(self.enable_pin);
8984        for val in &self.pin {
8985            __tmp.put_u8(*val);
8986        }
8987        for val in &self.new_pin {
8988            __tmp.put_u8(*val);
8989        }
8990        for val in &self.apn {
8991            __tmp.put_u8(*val);
8992        }
8993        for val in &self.puk {
8994            __tmp.put_u8(*val);
8995        }
8996        __tmp.put_u8(self.roaming);
8997        __tmp.put_u8(self.response as u8);
8998        if matches!(version, MavlinkVersion::V2) {
8999            let len = __tmp.len();
9000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9001        } else {
9002            __tmp.len()
9003        }
9004    }
9005}
9006#[doc = "id: 334"]
9007#[doc = "Report current used cellular network status."]
9008#[derive(Debug, Clone, PartialEq)]
9009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9010#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9011pub struct CELLULAR_STATUS_DATA {
9012    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
9013    pub mcc: u16,
9014    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
9015    pub mnc: u16,
9016    #[doc = "Location area code. If unknown, set to 0"]
9017    pub lac: u16,
9018    #[doc = "Cellular modem status"]
9019    pub status: CellularStatusFlag,
9020    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
9021    pub failure_reason: CellularNetworkFailedReason,
9022    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
9023    pub mavtype: CellularNetworkRadioType,
9024    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
9025    pub quality: u8,
9026}
9027impl CELLULAR_STATUS_DATA {
9028    pub const ENCODED_LEN: usize = 10usize;
9029    pub const DEFAULT: Self = Self {
9030        mcc: 0_u16,
9031        mnc: 0_u16,
9032        lac: 0_u16,
9033        status: CellularStatusFlag::DEFAULT,
9034        failure_reason: CellularNetworkFailedReason::DEFAULT,
9035        mavtype: CellularNetworkRadioType::DEFAULT,
9036        quality: 0_u8,
9037    };
9038    #[cfg(feature = "arbitrary")]
9039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9040        use arbitrary::{Arbitrary, Unstructured};
9041        let mut buf = [0u8; 1024];
9042        rng.fill_bytes(&mut buf);
9043        let mut unstructured = Unstructured::new(&buf);
9044        Self::arbitrary(&mut unstructured).unwrap_or_default()
9045    }
9046}
9047impl Default for CELLULAR_STATUS_DATA {
9048    fn default() -> Self {
9049        Self::DEFAULT.clone()
9050    }
9051}
9052impl MessageData for CELLULAR_STATUS_DATA {
9053    type Message = MavMessage;
9054    const ID: u32 = 334u32;
9055    const NAME: &'static str = "CELLULAR_STATUS";
9056    const EXTRA_CRC: u8 = 72u8;
9057    const ENCODED_LEN: usize = 10usize;
9058    fn deser(
9059        _version: MavlinkVersion,
9060        __input: &[u8],
9061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9062        let avail_len = __input.len();
9063        let mut payload_buf = [0; Self::ENCODED_LEN];
9064        let mut buf = if avail_len < Self::ENCODED_LEN {
9065            payload_buf[0..avail_len].copy_from_slice(__input);
9066            Bytes::new(&payload_buf)
9067        } else {
9068            Bytes::new(__input)
9069        };
9070        let mut __struct = Self::default();
9071        __struct.mcc = buf.get_u16_le();
9072        __struct.mnc = buf.get_u16_le();
9073        __struct.lac = buf.get_u16_le();
9074        let tmp = buf.get_u8();
9075        __struct.status =
9076            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9077                enum_type: "CellularStatusFlag",
9078                value: tmp as u32,
9079            })?;
9080        let tmp = buf.get_u8();
9081        __struct.failure_reason =
9082            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9083                enum_type: "CellularNetworkFailedReason",
9084                value: tmp as u32,
9085            })?;
9086        let tmp = buf.get_u8();
9087        __struct.mavtype =
9088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9089                enum_type: "CellularNetworkRadioType",
9090                value: tmp as u32,
9091            })?;
9092        __struct.quality = buf.get_u8();
9093        Ok(__struct)
9094    }
9095    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9096        let mut __tmp = BytesMut::new(bytes);
9097        #[allow(clippy::absurd_extreme_comparisons)]
9098        #[allow(unused_comparisons)]
9099        if __tmp.remaining() < Self::ENCODED_LEN {
9100            panic!(
9101                "buffer is too small (need {} bytes, but got {})",
9102                Self::ENCODED_LEN,
9103                __tmp.remaining(),
9104            )
9105        }
9106        __tmp.put_u16_le(self.mcc);
9107        __tmp.put_u16_le(self.mnc);
9108        __tmp.put_u16_le(self.lac);
9109        __tmp.put_u8(self.status as u8);
9110        __tmp.put_u8(self.failure_reason as u8);
9111        __tmp.put_u8(self.mavtype as u8);
9112        __tmp.put_u8(self.quality);
9113        if matches!(version, MavlinkVersion::V2) {
9114            let len = __tmp.len();
9115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9116        } else {
9117            __tmp.len()
9118        }
9119    }
9120}
9121#[doc = "id: 5"]
9122#[doc = "Request to control this MAV."]
9123#[derive(Debug, Clone, PartialEq)]
9124#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9126pub struct CHANGE_OPERATOR_CONTROL_DATA {
9127    #[doc = "System the GCS requests control for"]
9128    pub target_system: u8,
9129    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9130    pub control_request: u8,
9131    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9132    pub version: u8,
9133    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9134    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9135    pub passkey: [u8; 25],
9136}
9137impl CHANGE_OPERATOR_CONTROL_DATA {
9138    pub const ENCODED_LEN: usize = 28usize;
9139    pub const DEFAULT: Self = Self {
9140        target_system: 0_u8,
9141        control_request: 0_u8,
9142        version: 0_u8,
9143        passkey: [0_u8; 25usize],
9144    };
9145    #[cfg(feature = "arbitrary")]
9146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9147        use arbitrary::{Arbitrary, Unstructured};
9148        let mut buf = [0u8; 1024];
9149        rng.fill_bytes(&mut buf);
9150        let mut unstructured = Unstructured::new(&buf);
9151        Self::arbitrary(&mut unstructured).unwrap_or_default()
9152    }
9153}
9154impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9155    fn default() -> Self {
9156        Self::DEFAULT.clone()
9157    }
9158}
9159impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9160    type Message = MavMessage;
9161    const ID: u32 = 5u32;
9162    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9163    const EXTRA_CRC: u8 = 217u8;
9164    const ENCODED_LEN: usize = 28usize;
9165    fn deser(
9166        _version: MavlinkVersion,
9167        __input: &[u8],
9168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9169        let avail_len = __input.len();
9170        let mut payload_buf = [0; Self::ENCODED_LEN];
9171        let mut buf = if avail_len < Self::ENCODED_LEN {
9172            payload_buf[0..avail_len].copy_from_slice(__input);
9173            Bytes::new(&payload_buf)
9174        } else {
9175            Bytes::new(__input)
9176        };
9177        let mut __struct = Self::default();
9178        __struct.target_system = buf.get_u8();
9179        __struct.control_request = buf.get_u8();
9180        __struct.version = buf.get_u8();
9181        for v in &mut __struct.passkey {
9182            let val = buf.get_u8();
9183            *v = val;
9184        }
9185        Ok(__struct)
9186    }
9187    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9188        let mut __tmp = BytesMut::new(bytes);
9189        #[allow(clippy::absurd_extreme_comparisons)]
9190        #[allow(unused_comparisons)]
9191        if __tmp.remaining() < Self::ENCODED_LEN {
9192            panic!(
9193                "buffer is too small (need {} bytes, but got {})",
9194                Self::ENCODED_LEN,
9195                __tmp.remaining(),
9196            )
9197        }
9198        __tmp.put_u8(self.target_system);
9199        __tmp.put_u8(self.control_request);
9200        __tmp.put_u8(self.version);
9201        for val in &self.passkey {
9202            __tmp.put_u8(*val);
9203        }
9204        if matches!(version, MavlinkVersion::V2) {
9205            let len = __tmp.len();
9206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9207        } else {
9208            __tmp.len()
9209        }
9210    }
9211}
9212#[doc = "id: 6"]
9213#[doc = "Accept / deny control of this MAV."]
9214#[derive(Debug, Clone, PartialEq)]
9215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9217pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9218    #[doc = "ID of the GCS this message"]
9219    pub gcs_system_id: u8,
9220    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9221    pub control_request: u8,
9222    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9223    pub ack: u8,
9224}
9225impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9226    pub const ENCODED_LEN: usize = 3usize;
9227    pub const DEFAULT: Self = Self {
9228        gcs_system_id: 0_u8,
9229        control_request: 0_u8,
9230        ack: 0_u8,
9231    };
9232    #[cfg(feature = "arbitrary")]
9233    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9234        use arbitrary::{Arbitrary, Unstructured};
9235        let mut buf = [0u8; 1024];
9236        rng.fill_bytes(&mut buf);
9237        let mut unstructured = Unstructured::new(&buf);
9238        Self::arbitrary(&mut unstructured).unwrap_or_default()
9239    }
9240}
9241impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9242    fn default() -> Self {
9243        Self::DEFAULT.clone()
9244    }
9245}
9246impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9247    type Message = MavMessage;
9248    const ID: u32 = 6u32;
9249    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9250    const EXTRA_CRC: u8 = 104u8;
9251    const ENCODED_LEN: usize = 3usize;
9252    fn deser(
9253        _version: MavlinkVersion,
9254        __input: &[u8],
9255    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9256        let avail_len = __input.len();
9257        let mut payload_buf = [0; Self::ENCODED_LEN];
9258        let mut buf = if avail_len < Self::ENCODED_LEN {
9259            payload_buf[0..avail_len].copy_from_slice(__input);
9260            Bytes::new(&payload_buf)
9261        } else {
9262            Bytes::new(__input)
9263        };
9264        let mut __struct = Self::default();
9265        __struct.gcs_system_id = buf.get_u8();
9266        __struct.control_request = buf.get_u8();
9267        __struct.ack = buf.get_u8();
9268        Ok(__struct)
9269    }
9270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9271        let mut __tmp = BytesMut::new(bytes);
9272        #[allow(clippy::absurd_extreme_comparisons)]
9273        #[allow(unused_comparisons)]
9274        if __tmp.remaining() < Self::ENCODED_LEN {
9275            panic!(
9276                "buffer is too small (need {} bytes, but got {})",
9277                Self::ENCODED_LEN,
9278                __tmp.remaining(),
9279            )
9280        }
9281        __tmp.put_u8(self.gcs_system_id);
9282        __tmp.put_u8(self.control_request);
9283        __tmp.put_u8(self.ack);
9284        if matches!(version, MavlinkVersion::V2) {
9285            let len = __tmp.len();
9286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9287        } else {
9288            __tmp.len()
9289        }
9290    }
9291}
9292#[doc = "id: 247"]
9293#[doc = "Information about a potential collision."]
9294#[derive(Debug, Clone, PartialEq)]
9295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9297pub struct COLLISION_DATA {
9298    #[doc = "Unique identifier, domain based on src field"]
9299    pub id: u32,
9300    #[doc = "Estimated time until collision occurs"]
9301    pub time_to_minimum_delta: f32,
9302    #[doc = "Closest vertical distance between vehicle and object"]
9303    pub altitude_minimum_delta: f32,
9304    #[doc = "Closest horizontal distance between vehicle and object"]
9305    pub horizontal_minimum_delta: f32,
9306    #[doc = "Collision data source"]
9307    pub src: MavCollisionSrc,
9308    #[doc = "Action that is being taken to avoid this collision"]
9309    pub action: MavCollisionAction,
9310    #[doc = "How concerned the aircraft is about this collision"]
9311    pub threat_level: MavCollisionThreatLevel,
9312}
9313impl COLLISION_DATA {
9314    pub const ENCODED_LEN: usize = 19usize;
9315    pub const DEFAULT: Self = Self {
9316        id: 0_u32,
9317        time_to_minimum_delta: 0.0_f32,
9318        altitude_minimum_delta: 0.0_f32,
9319        horizontal_minimum_delta: 0.0_f32,
9320        src: MavCollisionSrc::DEFAULT,
9321        action: MavCollisionAction::DEFAULT,
9322        threat_level: MavCollisionThreatLevel::DEFAULT,
9323    };
9324    #[cfg(feature = "arbitrary")]
9325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9326        use arbitrary::{Arbitrary, Unstructured};
9327        let mut buf = [0u8; 1024];
9328        rng.fill_bytes(&mut buf);
9329        let mut unstructured = Unstructured::new(&buf);
9330        Self::arbitrary(&mut unstructured).unwrap_or_default()
9331    }
9332}
9333impl Default for COLLISION_DATA {
9334    fn default() -> Self {
9335        Self::DEFAULT.clone()
9336    }
9337}
9338impl MessageData for COLLISION_DATA {
9339    type Message = MavMessage;
9340    const ID: u32 = 247u32;
9341    const NAME: &'static str = "COLLISION";
9342    const EXTRA_CRC: u8 = 81u8;
9343    const ENCODED_LEN: usize = 19usize;
9344    fn deser(
9345        _version: MavlinkVersion,
9346        __input: &[u8],
9347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9348        let avail_len = __input.len();
9349        let mut payload_buf = [0; Self::ENCODED_LEN];
9350        let mut buf = if avail_len < Self::ENCODED_LEN {
9351            payload_buf[0..avail_len].copy_from_slice(__input);
9352            Bytes::new(&payload_buf)
9353        } else {
9354            Bytes::new(__input)
9355        };
9356        let mut __struct = Self::default();
9357        __struct.id = buf.get_u32_le();
9358        __struct.time_to_minimum_delta = buf.get_f32_le();
9359        __struct.altitude_minimum_delta = buf.get_f32_le();
9360        __struct.horizontal_minimum_delta = buf.get_f32_le();
9361        let tmp = buf.get_u8();
9362        __struct.src =
9363            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9364                enum_type: "MavCollisionSrc",
9365                value: tmp as u32,
9366            })?;
9367        let tmp = buf.get_u8();
9368        __struct.action =
9369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9370                enum_type: "MavCollisionAction",
9371                value: tmp as u32,
9372            })?;
9373        let tmp = buf.get_u8();
9374        __struct.threat_level =
9375            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9376                enum_type: "MavCollisionThreatLevel",
9377                value: tmp as u32,
9378            })?;
9379        Ok(__struct)
9380    }
9381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9382        let mut __tmp = BytesMut::new(bytes);
9383        #[allow(clippy::absurd_extreme_comparisons)]
9384        #[allow(unused_comparisons)]
9385        if __tmp.remaining() < Self::ENCODED_LEN {
9386            panic!(
9387                "buffer is too small (need {} bytes, but got {})",
9388                Self::ENCODED_LEN,
9389                __tmp.remaining(),
9390            )
9391        }
9392        __tmp.put_u32_le(self.id);
9393        __tmp.put_f32_le(self.time_to_minimum_delta);
9394        __tmp.put_f32_le(self.altitude_minimum_delta);
9395        __tmp.put_f32_le(self.horizontal_minimum_delta);
9396        __tmp.put_u8(self.src as u8);
9397        __tmp.put_u8(self.action as u8);
9398        __tmp.put_u8(self.threat_level as u8);
9399        if matches!(version, MavlinkVersion::V2) {
9400            let len = __tmp.len();
9401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9402        } else {
9403            __tmp.len()
9404        }
9405    }
9406}
9407#[doc = "id: 77"]
9408#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9409#[derive(Debug, Clone, PartialEq)]
9410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9412pub struct COMMAND_ACK_DATA {
9413    #[doc = "Command ID (of acknowledged command)."]
9414    pub command: MavCmd,
9415    #[doc = "Result of command."]
9416    pub result: MavResult,
9417    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9419    pub progress: u8,
9420    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9422    pub result_param2: i32,
9423    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9425    pub target_system: u8,
9426    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9428    pub target_component: u8,
9429}
9430impl COMMAND_ACK_DATA {
9431    pub const ENCODED_LEN: usize = 10usize;
9432    pub const DEFAULT: Self = Self {
9433        command: MavCmd::DEFAULT,
9434        result: MavResult::DEFAULT,
9435        progress: 0_u8,
9436        result_param2: 0_i32,
9437        target_system: 0_u8,
9438        target_component: 0_u8,
9439    };
9440    #[cfg(feature = "arbitrary")]
9441    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9442        use arbitrary::{Arbitrary, Unstructured};
9443        let mut buf = [0u8; 1024];
9444        rng.fill_bytes(&mut buf);
9445        let mut unstructured = Unstructured::new(&buf);
9446        Self::arbitrary(&mut unstructured).unwrap_or_default()
9447    }
9448}
9449impl Default for COMMAND_ACK_DATA {
9450    fn default() -> Self {
9451        Self::DEFAULT.clone()
9452    }
9453}
9454impl MessageData for COMMAND_ACK_DATA {
9455    type Message = MavMessage;
9456    const ID: u32 = 77u32;
9457    const NAME: &'static str = "COMMAND_ACK";
9458    const EXTRA_CRC: u8 = 143u8;
9459    const ENCODED_LEN: usize = 10usize;
9460    fn deser(
9461        _version: MavlinkVersion,
9462        __input: &[u8],
9463    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9464        let avail_len = __input.len();
9465        let mut payload_buf = [0; Self::ENCODED_LEN];
9466        let mut buf = if avail_len < Self::ENCODED_LEN {
9467            payload_buf[0..avail_len].copy_from_slice(__input);
9468            Bytes::new(&payload_buf)
9469        } else {
9470            Bytes::new(__input)
9471        };
9472        let mut __struct = Self::default();
9473        let tmp = buf.get_u16_le();
9474        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9475            ::mavlink_core::error::ParserError::InvalidEnum {
9476                enum_type: "MavCmd",
9477                value: tmp as u32,
9478            },
9479        )?;
9480        let tmp = buf.get_u8();
9481        __struct.result =
9482            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9483                enum_type: "MavResult",
9484                value: tmp as u32,
9485            })?;
9486        __struct.progress = buf.get_u8();
9487        __struct.result_param2 = buf.get_i32_le();
9488        __struct.target_system = buf.get_u8();
9489        __struct.target_component = buf.get_u8();
9490        Ok(__struct)
9491    }
9492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9493        let mut __tmp = BytesMut::new(bytes);
9494        #[allow(clippy::absurd_extreme_comparisons)]
9495        #[allow(unused_comparisons)]
9496        if __tmp.remaining() < Self::ENCODED_LEN {
9497            panic!(
9498                "buffer is too small (need {} bytes, but got {})",
9499                Self::ENCODED_LEN,
9500                __tmp.remaining(),
9501            )
9502        }
9503        __tmp.put_u16_le(self.command as u16);
9504        __tmp.put_u8(self.result as u8);
9505        __tmp.put_u8(self.progress);
9506        __tmp.put_i32_le(self.result_param2);
9507        __tmp.put_u8(self.target_system);
9508        __tmp.put_u8(self.target_component);
9509        if matches!(version, MavlinkVersion::V2) {
9510            let len = __tmp.len();
9511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9512        } else {
9513            __tmp.len()
9514        }
9515    }
9516}
9517#[doc = "id: 80"]
9518#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9519#[derive(Debug, Clone, PartialEq)]
9520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9522pub struct COMMAND_CANCEL_DATA {
9523    #[doc = "Command ID (of command to cancel)."]
9524    pub command: MavCmd,
9525    #[doc = "System executing long running command. Should not be broadcast (0)."]
9526    pub target_system: u8,
9527    #[doc = "Component executing long running command."]
9528    pub target_component: u8,
9529}
9530impl COMMAND_CANCEL_DATA {
9531    pub const ENCODED_LEN: usize = 4usize;
9532    pub const DEFAULT: Self = Self {
9533        command: MavCmd::DEFAULT,
9534        target_system: 0_u8,
9535        target_component: 0_u8,
9536    };
9537    #[cfg(feature = "arbitrary")]
9538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9539        use arbitrary::{Arbitrary, Unstructured};
9540        let mut buf = [0u8; 1024];
9541        rng.fill_bytes(&mut buf);
9542        let mut unstructured = Unstructured::new(&buf);
9543        Self::arbitrary(&mut unstructured).unwrap_or_default()
9544    }
9545}
9546impl Default for COMMAND_CANCEL_DATA {
9547    fn default() -> Self {
9548        Self::DEFAULT.clone()
9549    }
9550}
9551impl MessageData for COMMAND_CANCEL_DATA {
9552    type Message = MavMessage;
9553    const ID: u32 = 80u32;
9554    const NAME: &'static str = "COMMAND_CANCEL";
9555    const EXTRA_CRC: u8 = 14u8;
9556    const ENCODED_LEN: usize = 4usize;
9557    fn deser(
9558        _version: MavlinkVersion,
9559        __input: &[u8],
9560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9561        let avail_len = __input.len();
9562        let mut payload_buf = [0; Self::ENCODED_LEN];
9563        let mut buf = if avail_len < Self::ENCODED_LEN {
9564            payload_buf[0..avail_len].copy_from_slice(__input);
9565            Bytes::new(&payload_buf)
9566        } else {
9567            Bytes::new(__input)
9568        };
9569        let mut __struct = Self::default();
9570        let tmp = buf.get_u16_le();
9571        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9572            ::mavlink_core::error::ParserError::InvalidEnum {
9573                enum_type: "MavCmd",
9574                value: tmp as u32,
9575            },
9576        )?;
9577        __struct.target_system = buf.get_u8();
9578        __struct.target_component = buf.get_u8();
9579        Ok(__struct)
9580    }
9581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9582        let mut __tmp = BytesMut::new(bytes);
9583        #[allow(clippy::absurd_extreme_comparisons)]
9584        #[allow(unused_comparisons)]
9585        if __tmp.remaining() < Self::ENCODED_LEN {
9586            panic!(
9587                "buffer is too small (need {} bytes, but got {})",
9588                Self::ENCODED_LEN,
9589                __tmp.remaining(),
9590            )
9591        }
9592        __tmp.put_u16_le(self.command as u16);
9593        __tmp.put_u8(self.target_system);
9594        __tmp.put_u8(self.target_component);
9595        if matches!(version, MavlinkVersion::V2) {
9596            let len = __tmp.len();
9597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9598        } else {
9599            __tmp.len()
9600        }
9601    }
9602}
9603#[doc = "id: 75"]
9604#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9605#[derive(Debug, Clone, PartialEq)]
9606#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9607#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9608pub struct COMMAND_INT_DATA {
9609    #[doc = "PARAM1, see MAV_CMD enum"]
9610    pub param1: f32,
9611    #[doc = "PARAM2, see MAV_CMD enum"]
9612    pub param2: f32,
9613    #[doc = "PARAM3, see MAV_CMD enum"]
9614    pub param3: f32,
9615    #[doc = "PARAM4, see MAV_CMD enum"]
9616    pub param4: f32,
9617    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9618    pub x: i32,
9619    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9620    pub y: i32,
9621    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9622    pub z: f32,
9623    #[doc = "The scheduled action for the mission item."]
9624    pub command: MavCmd,
9625    #[doc = "System ID"]
9626    pub target_system: u8,
9627    #[doc = "Component ID"]
9628    pub target_component: u8,
9629    #[doc = "The coordinate system of the COMMAND."]
9630    pub frame: MavFrame,
9631    #[doc = "Not used."]
9632    pub current: u8,
9633    #[doc = "Not used (set 0)."]
9634    pub autocontinue: u8,
9635}
9636impl COMMAND_INT_DATA {
9637    pub const ENCODED_LEN: usize = 35usize;
9638    pub const DEFAULT: Self = Self {
9639        param1: 0.0_f32,
9640        param2: 0.0_f32,
9641        param3: 0.0_f32,
9642        param4: 0.0_f32,
9643        x: 0_i32,
9644        y: 0_i32,
9645        z: 0.0_f32,
9646        command: MavCmd::DEFAULT,
9647        target_system: 0_u8,
9648        target_component: 0_u8,
9649        frame: MavFrame::DEFAULT,
9650        current: 0_u8,
9651        autocontinue: 0_u8,
9652    };
9653    #[cfg(feature = "arbitrary")]
9654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9655        use arbitrary::{Arbitrary, Unstructured};
9656        let mut buf = [0u8; 1024];
9657        rng.fill_bytes(&mut buf);
9658        let mut unstructured = Unstructured::new(&buf);
9659        Self::arbitrary(&mut unstructured).unwrap_or_default()
9660    }
9661}
9662impl Default for COMMAND_INT_DATA {
9663    fn default() -> Self {
9664        Self::DEFAULT.clone()
9665    }
9666}
9667impl MessageData for COMMAND_INT_DATA {
9668    type Message = MavMessage;
9669    const ID: u32 = 75u32;
9670    const NAME: &'static str = "COMMAND_INT";
9671    const EXTRA_CRC: u8 = 158u8;
9672    const ENCODED_LEN: usize = 35usize;
9673    fn deser(
9674        _version: MavlinkVersion,
9675        __input: &[u8],
9676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9677        let avail_len = __input.len();
9678        let mut payload_buf = [0; Self::ENCODED_LEN];
9679        let mut buf = if avail_len < Self::ENCODED_LEN {
9680            payload_buf[0..avail_len].copy_from_slice(__input);
9681            Bytes::new(&payload_buf)
9682        } else {
9683            Bytes::new(__input)
9684        };
9685        let mut __struct = Self::default();
9686        __struct.param1 = buf.get_f32_le();
9687        __struct.param2 = buf.get_f32_le();
9688        __struct.param3 = buf.get_f32_le();
9689        __struct.param4 = buf.get_f32_le();
9690        __struct.x = buf.get_i32_le();
9691        __struct.y = buf.get_i32_le();
9692        __struct.z = buf.get_f32_le();
9693        let tmp = buf.get_u16_le();
9694        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9695            ::mavlink_core::error::ParserError::InvalidEnum {
9696                enum_type: "MavCmd",
9697                value: tmp as u32,
9698            },
9699        )?;
9700        __struct.target_system = buf.get_u8();
9701        __struct.target_component = buf.get_u8();
9702        let tmp = buf.get_u8();
9703        __struct.frame =
9704            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9705                enum_type: "MavFrame",
9706                value: tmp as u32,
9707            })?;
9708        __struct.current = buf.get_u8();
9709        __struct.autocontinue = buf.get_u8();
9710        Ok(__struct)
9711    }
9712    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9713        let mut __tmp = BytesMut::new(bytes);
9714        #[allow(clippy::absurd_extreme_comparisons)]
9715        #[allow(unused_comparisons)]
9716        if __tmp.remaining() < Self::ENCODED_LEN {
9717            panic!(
9718                "buffer is too small (need {} bytes, but got {})",
9719                Self::ENCODED_LEN,
9720                __tmp.remaining(),
9721            )
9722        }
9723        __tmp.put_f32_le(self.param1);
9724        __tmp.put_f32_le(self.param2);
9725        __tmp.put_f32_le(self.param3);
9726        __tmp.put_f32_le(self.param4);
9727        __tmp.put_i32_le(self.x);
9728        __tmp.put_i32_le(self.y);
9729        __tmp.put_f32_le(self.z);
9730        __tmp.put_u16_le(self.command as u16);
9731        __tmp.put_u8(self.target_system);
9732        __tmp.put_u8(self.target_component);
9733        __tmp.put_u8(self.frame as u8);
9734        __tmp.put_u8(self.current);
9735        __tmp.put_u8(self.autocontinue);
9736        if matches!(version, MavlinkVersion::V2) {
9737            let len = __tmp.len();
9738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9739        } else {
9740            __tmp.len()
9741        }
9742    }
9743}
9744#[doc = "id: 76"]
9745#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9746#[derive(Debug, Clone, PartialEq)]
9747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9749pub struct COMMAND_LONG_DATA {
9750    #[doc = "Parameter 1 (for the specific command)."]
9751    pub param1: f32,
9752    #[doc = "Parameter 2 (for the specific command)."]
9753    pub param2: f32,
9754    #[doc = "Parameter 3 (for the specific command)."]
9755    pub param3: f32,
9756    #[doc = "Parameter 4 (for the specific command)."]
9757    pub param4: f32,
9758    #[doc = "Parameter 5 (for the specific command)."]
9759    pub param5: f32,
9760    #[doc = "Parameter 6 (for the specific command)."]
9761    pub param6: f32,
9762    #[doc = "Parameter 7 (for the specific command)."]
9763    pub param7: f32,
9764    #[doc = "Command ID (of command to send)."]
9765    pub command: MavCmd,
9766    #[doc = "System which should execute the command"]
9767    pub target_system: u8,
9768    #[doc = "Component which should execute the command, 0 for all components"]
9769    pub target_component: u8,
9770    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9771    pub confirmation: u8,
9772}
9773impl COMMAND_LONG_DATA {
9774    pub const ENCODED_LEN: usize = 33usize;
9775    pub const DEFAULT: Self = Self {
9776        param1: 0.0_f32,
9777        param2: 0.0_f32,
9778        param3: 0.0_f32,
9779        param4: 0.0_f32,
9780        param5: 0.0_f32,
9781        param6: 0.0_f32,
9782        param7: 0.0_f32,
9783        command: MavCmd::DEFAULT,
9784        target_system: 0_u8,
9785        target_component: 0_u8,
9786        confirmation: 0_u8,
9787    };
9788    #[cfg(feature = "arbitrary")]
9789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9790        use arbitrary::{Arbitrary, Unstructured};
9791        let mut buf = [0u8; 1024];
9792        rng.fill_bytes(&mut buf);
9793        let mut unstructured = Unstructured::new(&buf);
9794        Self::arbitrary(&mut unstructured).unwrap_or_default()
9795    }
9796}
9797impl Default for COMMAND_LONG_DATA {
9798    fn default() -> Self {
9799        Self::DEFAULT.clone()
9800    }
9801}
9802impl MessageData for COMMAND_LONG_DATA {
9803    type Message = MavMessage;
9804    const ID: u32 = 76u32;
9805    const NAME: &'static str = "COMMAND_LONG";
9806    const EXTRA_CRC: u8 = 152u8;
9807    const ENCODED_LEN: usize = 33usize;
9808    fn deser(
9809        _version: MavlinkVersion,
9810        __input: &[u8],
9811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9812        let avail_len = __input.len();
9813        let mut payload_buf = [0; Self::ENCODED_LEN];
9814        let mut buf = if avail_len < Self::ENCODED_LEN {
9815            payload_buf[0..avail_len].copy_from_slice(__input);
9816            Bytes::new(&payload_buf)
9817        } else {
9818            Bytes::new(__input)
9819        };
9820        let mut __struct = Self::default();
9821        __struct.param1 = buf.get_f32_le();
9822        __struct.param2 = buf.get_f32_le();
9823        __struct.param3 = buf.get_f32_le();
9824        __struct.param4 = buf.get_f32_le();
9825        __struct.param5 = buf.get_f32_le();
9826        __struct.param6 = buf.get_f32_le();
9827        __struct.param7 = buf.get_f32_le();
9828        let tmp = buf.get_u16_le();
9829        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9830            ::mavlink_core::error::ParserError::InvalidEnum {
9831                enum_type: "MavCmd",
9832                value: tmp as u32,
9833            },
9834        )?;
9835        __struct.target_system = buf.get_u8();
9836        __struct.target_component = buf.get_u8();
9837        __struct.confirmation = buf.get_u8();
9838        Ok(__struct)
9839    }
9840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9841        let mut __tmp = BytesMut::new(bytes);
9842        #[allow(clippy::absurd_extreme_comparisons)]
9843        #[allow(unused_comparisons)]
9844        if __tmp.remaining() < Self::ENCODED_LEN {
9845            panic!(
9846                "buffer is too small (need {} bytes, but got {})",
9847                Self::ENCODED_LEN,
9848                __tmp.remaining(),
9849            )
9850        }
9851        __tmp.put_f32_le(self.param1);
9852        __tmp.put_f32_le(self.param2);
9853        __tmp.put_f32_le(self.param3);
9854        __tmp.put_f32_le(self.param4);
9855        __tmp.put_f32_le(self.param5);
9856        __tmp.put_f32_le(self.param6);
9857        __tmp.put_f32_le(self.param7);
9858        __tmp.put_u16_le(self.command as u16);
9859        __tmp.put_u8(self.target_system);
9860        __tmp.put_u8(self.target_component);
9861        __tmp.put_u8(self.confirmation);
9862        if matches!(version, MavlinkVersion::V2) {
9863            let len = __tmp.len();
9864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9865        } else {
9866            __tmp.len()
9867        }
9868    }
9869}
9870#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9871#[doc = "id: 395"]
9872#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9873#[derive(Debug, Clone, PartialEq)]
9874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9876pub struct COMPONENT_INFORMATION_DATA {
9877    #[doc = "Timestamp (time since system boot)."]
9878    pub time_boot_ms: u32,
9879    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9880    pub general_metadata_file_crc: u32,
9881    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9882    pub peripherals_metadata_file_crc: u32,
9883    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9885    pub general_metadata_uri: [u8; 100],
9886    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9888    pub peripherals_metadata_uri: [u8; 100],
9889}
9890impl COMPONENT_INFORMATION_DATA {
9891    pub const ENCODED_LEN: usize = 212usize;
9892    pub const DEFAULT: Self = Self {
9893        time_boot_ms: 0_u32,
9894        general_metadata_file_crc: 0_u32,
9895        peripherals_metadata_file_crc: 0_u32,
9896        general_metadata_uri: [0_u8; 100usize],
9897        peripherals_metadata_uri: [0_u8; 100usize],
9898    };
9899    #[cfg(feature = "arbitrary")]
9900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9901        use arbitrary::{Arbitrary, Unstructured};
9902        let mut buf = [0u8; 1024];
9903        rng.fill_bytes(&mut buf);
9904        let mut unstructured = Unstructured::new(&buf);
9905        Self::arbitrary(&mut unstructured).unwrap_or_default()
9906    }
9907}
9908impl Default for COMPONENT_INFORMATION_DATA {
9909    fn default() -> Self {
9910        Self::DEFAULT.clone()
9911    }
9912}
9913impl MessageData for COMPONENT_INFORMATION_DATA {
9914    type Message = MavMessage;
9915    const ID: u32 = 395u32;
9916    const NAME: &'static str = "COMPONENT_INFORMATION";
9917    const EXTRA_CRC: u8 = 0u8;
9918    const ENCODED_LEN: usize = 212usize;
9919    fn deser(
9920        _version: MavlinkVersion,
9921        __input: &[u8],
9922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9923        let avail_len = __input.len();
9924        let mut payload_buf = [0; Self::ENCODED_LEN];
9925        let mut buf = if avail_len < Self::ENCODED_LEN {
9926            payload_buf[0..avail_len].copy_from_slice(__input);
9927            Bytes::new(&payload_buf)
9928        } else {
9929            Bytes::new(__input)
9930        };
9931        let mut __struct = Self::default();
9932        __struct.time_boot_ms = buf.get_u32_le();
9933        __struct.general_metadata_file_crc = buf.get_u32_le();
9934        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9935        for v in &mut __struct.general_metadata_uri {
9936            let val = buf.get_u8();
9937            *v = val;
9938        }
9939        for v in &mut __struct.peripherals_metadata_uri {
9940            let val = buf.get_u8();
9941            *v = val;
9942        }
9943        Ok(__struct)
9944    }
9945    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9946        let mut __tmp = BytesMut::new(bytes);
9947        #[allow(clippy::absurd_extreme_comparisons)]
9948        #[allow(unused_comparisons)]
9949        if __tmp.remaining() < Self::ENCODED_LEN {
9950            panic!(
9951                "buffer is too small (need {} bytes, but got {})",
9952                Self::ENCODED_LEN,
9953                __tmp.remaining(),
9954            )
9955        }
9956        __tmp.put_u32_le(self.time_boot_ms);
9957        __tmp.put_u32_le(self.general_metadata_file_crc);
9958        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9959        for val in &self.general_metadata_uri {
9960            __tmp.put_u8(*val);
9961        }
9962        for val in &self.peripherals_metadata_uri {
9963            __tmp.put_u8(*val);
9964        }
9965        if matches!(version, MavlinkVersion::V2) {
9966            let len = __tmp.len();
9967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9968        } else {
9969            __tmp.len()
9970        }
9971    }
9972}
9973#[doc = "id: 396"]
9974#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9975#[derive(Debug, Clone, PartialEq)]
9976#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9978pub struct COMPONENT_INFORMATION_BASIC_DATA {
9979    #[doc = "Component capability flags"]
9980    pub capabilities: MavProtocolCapability,
9981    #[doc = "Timestamp (time since system boot)."]
9982    pub time_boot_ms: u32,
9983    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9984    pub time_manufacture_s: u32,
9985    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9986    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9987    pub vendor_name: [u8; 32],
9988    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9989    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9990    pub model_name: [u8; 32],
9991    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9992    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9993    pub software_version: [u8; 24],
9994    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9996    pub hardware_version: [u8; 24],
9997    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9998    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9999    pub serial_number: [u8; 32],
10000}
10001impl COMPONENT_INFORMATION_BASIC_DATA {
10002    pub const ENCODED_LEN: usize = 160usize;
10003    pub const DEFAULT: Self = Self {
10004        capabilities: MavProtocolCapability::DEFAULT,
10005        time_boot_ms: 0_u32,
10006        time_manufacture_s: 0_u32,
10007        vendor_name: [0_u8; 32usize],
10008        model_name: [0_u8; 32usize],
10009        software_version: [0_u8; 24usize],
10010        hardware_version: [0_u8; 24usize],
10011        serial_number: [0_u8; 32usize],
10012    };
10013    #[cfg(feature = "arbitrary")]
10014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10015        use arbitrary::{Arbitrary, Unstructured};
10016        let mut buf = [0u8; 1024];
10017        rng.fill_bytes(&mut buf);
10018        let mut unstructured = Unstructured::new(&buf);
10019        Self::arbitrary(&mut unstructured).unwrap_or_default()
10020    }
10021}
10022impl Default for COMPONENT_INFORMATION_BASIC_DATA {
10023    fn default() -> Self {
10024        Self::DEFAULT.clone()
10025    }
10026}
10027impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
10028    type Message = MavMessage;
10029    const ID: u32 = 396u32;
10030    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
10031    const EXTRA_CRC: u8 = 50u8;
10032    const ENCODED_LEN: usize = 160usize;
10033    fn deser(
10034        _version: MavlinkVersion,
10035        __input: &[u8],
10036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10037        let avail_len = __input.len();
10038        let mut payload_buf = [0; Self::ENCODED_LEN];
10039        let mut buf = if avail_len < Self::ENCODED_LEN {
10040            payload_buf[0..avail_len].copy_from_slice(__input);
10041            Bytes::new(&payload_buf)
10042        } else {
10043            Bytes::new(__input)
10044        };
10045        let mut __struct = Self::default();
10046        let tmp = buf.get_u64_le();
10047        __struct.capabilities = MavProtocolCapability::from_bits(
10048            tmp & MavProtocolCapability::all().bits(),
10049        )
10050        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10051            flag_type: "MavProtocolCapability",
10052            value: tmp as u32,
10053        })?;
10054        __struct.time_boot_ms = buf.get_u32_le();
10055        __struct.time_manufacture_s = buf.get_u32_le();
10056        for v in &mut __struct.vendor_name {
10057            let val = buf.get_u8();
10058            *v = val;
10059        }
10060        for v in &mut __struct.model_name {
10061            let val = buf.get_u8();
10062            *v = val;
10063        }
10064        for v in &mut __struct.software_version {
10065            let val = buf.get_u8();
10066            *v = val;
10067        }
10068        for v in &mut __struct.hardware_version {
10069            let val = buf.get_u8();
10070            *v = val;
10071        }
10072        for v in &mut __struct.serial_number {
10073            let val = buf.get_u8();
10074            *v = val;
10075        }
10076        Ok(__struct)
10077    }
10078    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10079        let mut __tmp = BytesMut::new(bytes);
10080        #[allow(clippy::absurd_extreme_comparisons)]
10081        #[allow(unused_comparisons)]
10082        if __tmp.remaining() < Self::ENCODED_LEN {
10083            panic!(
10084                "buffer is too small (need {} bytes, but got {})",
10085                Self::ENCODED_LEN,
10086                __tmp.remaining(),
10087            )
10088        }
10089        __tmp.put_u64_le(self.capabilities.bits());
10090        __tmp.put_u32_le(self.time_boot_ms);
10091        __tmp.put_u32_le(self.time_manufacture_s);
10092        for val in &self.vendor_name {
10093            __tmp.put_u8(*val);
10094        }
10095        for val in &self.model_name {
10096            __tmp.put_u8(*val);
10097        }
10098        for val in &self.software_version {
10099            __tmp.put_u8(*val);
10100        }
10101        for val in &self.hardware_version {
10102            __tmp.put_u8(*val);
10103        }
10104        for val in &self.serial_number {
10105            __tmp.put_u8(*val);
10106        }
10107        if matches!(version, MavlinkVersion::V2) {
10108            let len = __tmp.len();
10109            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10110        } else {
10111            __tmp.len()
10112        }
10113    }
10114}
10115#[doc = "id: 397"]
10116#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10117#[derive(Debug, Clone, PartialEq)]
10118#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10119#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10120pub struct COMPONENT_METADATA_DATA {
10121    #[doc = "Timestamp (time since system boot)."]
10122    pub time_boot_ms: u32,
10123    #[doc = "CRC32 of the general metadata file."]
10124    pub file_crc: u32,
10125    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10127    pub uri: [u8; 100],
10128}
10129impl COMPONENT_METADATA_DATA {
10130    pub const ENCODED_LEN: usize = 108usize;
10131    pub const DEFAULT: Self = Self {
10132        time_boot_ms: 0_u32,
10133        file_crc: 0_u32,
10134        uri: [0_u8; 100usize],
10135    };
10136    #[cfg(feature = "arbitrary")]
10137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10138        use arbitrary::{Arbitrary, Unstructured};
10139        let mut buf = [0u8; 1024];
10140        rng.fill_bytes(&mut buf);
10141        let mut unstructured = Unstructured::new(&buf);
10142        Self::arbitrary(&mut unstructured).unwrap_or_default()
10143    }
10144}
10145impl Default for COMPONENT_METADATA_DATA {
10146    fn default() -> Self {
10147        Self::DEFAULT.clone()
10148    }
10149}
10150impl MessageData for COMPONENT_METADATA_DATA {
10151    type Message = MavMessage;
10152    const ID: u32 = 397u32;
10153    const NAME: &'static str = "COMPONENT_METADATA";
10154    const EXTRA_CRC: u8 = 182u8;
10155    const ENCODED_LEN: usize = 108usize;
10156    fn deser(
10157        _version: MavlinkVersion,
10158        __input: &[u8],
10159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10160        let avail_len = __input.len();
10161        let mut payload_buf = [0; Self::ENCODED_LEN];
10162        let mut buf = if avail_len < Self::ENCODED_LEN {
10163            payload_buf[0..avail_len].copy_from_slice(__input);
10164            Bytes::new(&payload_buf)
10165        } else {
10166            Bytes::new(__input)
10167        };
10168        let mut __struct = Self::default();
10169        __struct.time_boot_ms = buf.get_u32_le();
10170        __struct.file_crc = buf.get_u32_le();
10171        for v in &mut __struct.uri {
10172            let val = buf.get_u8();
10173            *v = val;
10174        }
10175        Ok(__struct)
10176    }
10177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10178        let mut __tmp = BytesMut::new(bytes);
10179        #[allow(clippy::absurd_extreme_comparisons)]
10180        #[allow(unused_comparisons)]
10181        if __tmp.remaining() < Self::ENCODED_LEN {
10182            panic!(
10183                "buffer is too small (need {} bytes, but got {})",
10184                Self::ENCODED_LEN,
10185                __tmp.remaining(),
10186            )
10187        }
10188        __tmp.put_u32_le(self.time_boot_ms);
10189        __tmp.put_u32_le(self.file_crc);
10190        for val in &self.uri {
10191            __tmp.put_u8(*val);
10192        }
10193        if matches!(version, MavlinkVersion::V2) {
10194            let len = __tmp.len();
10195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10196        } else {
10197            __tmp.len()
10198        }
10199    }
10200}
10201#[doc = "id: 146"]
10202#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10203#[derive(Debug, Clone, PartialEq)]
10204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10206pub struct CONTROL_SYSTEM_STATE_DATA {
10207    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10208    pub time_usec: u64,
10209    #[doc = "X acceleration in body frame"]
10210    pub x_acc: f32,
10211    #[doc = "Y acceleration in body frame"]
10212    pub y_acc: f32,
10213    #[doc = "Z acceleration in body frame"]
10214    pub z_acc: f32,
10215    #[doc = "X velocity in body frame"]
10216    pub x_vel: f32,
10217    #[doc = "Y velocity in body frame"]
10218    pub y_vel: f32,
10219    #[doc = "Z velocity in body frame"]
10220    pub z_vel: f32,
10221    #[doc = "X position in local frame"]
10222    pub x_pos: f32,
10223    #[doc = "Y position in local frame"]
10224    pub y_pos: f32,
10225    #[doc = "Z position in local frame"]
10226    pub z_pos: f32,
10227    #[doc = "Airspeed, set to -1 if unknown"]
10228    pub airspeed: f32,
10229    #[doc = "Variance of body velocity estimate"]
10230    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10231    pub vel_variance: [f32; 3],
10232    #[doc = "Variance in local position"]
10233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10234    pub pos_variance: [f32; 3],
10235    #[doc = "The attitude, represented as Quaternion"]
10236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10237    pub q: [f32; 4],
10238    #[doc = "Angular rate in roll axis"]
10239    pub roll_rate: f32,
10240    #[doc = "Angular rate in pitch axis"]
10241    pub pitch_rate: f32,
10242    #[doc = "Angular rate in yaw axis"]
10243    pub yaw_rate: f32,
10244}
10245impl CONTROL_SYSTEM_STATE_DATA {
10246    pub const ENCODED_LEN: usize = 100usize;
10247    pub const DEFAULT: Self = Self {
10248        time_usec: 0_u64,
10249        x_acc: 0.0_f32,
10250        y_acc: 0.0_f32,
10251        z_acc: 0.0_f32,
10252        x_vel: 0.0_f32,
10253        y_vel: 0.0_f32,
10254        z_vel: 0.0_f32,
10255        x_pos: 0.0_f32,
10256        y_pos: 0.0_f32,
10257        z_pos: 0.0_f32,
10258        airspeed: 0.0_f32,
10259        vel_variance: [0.0_f32; 3usize],
10260        pos_variance: [0.0_f32; 3usize],
10261        q: [0.0_f32; 4usize],
10262        roll_rate: 0.0_f32,
10263        pitch_rate: 0.0_f32,
10264        yaw_rate: 0.0_f32,
10265    };
10266    #[cfg(feature = "arbitrary")]
10267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10268        use arbitrary::{Arbitrary, Unstructured};
10269        let mut buf = [0u8; 1024];
10270        rng.fill_bytes(&mut buf);
10271        let mut unstructured = Unstructured::new(&buf);
10272        Self::arbitrary(&mut unstructured).unwrap_or_default()
10273    }
10274}
10275impl Default for CONTROL_SYSTEM_STATE_DATA {
10276    fn default() -> Self {
10277        Self::DEFAULT.clone()
10278    }
10279}
10280impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10281    type Message = MavMessage;
10282    const ID: u32 = 146u32;
10283    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10284    const EXTRA_CRC: u8 = 103u8;
10285    const ENCODED_LEN: usize = 100usize;
10286    fn deser(
10287        _version: MavlinkVersion,
10288        __input: &[u8],
10289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10290        let avail_len = __input.len();
10291        let mut payload_buf = [0; Self::ENCODED_LEN];
10292        let mut buf = if avail_len < Self::ENCODED_LEN {
10293            payload_buf[0..avail_len].copy_from_slice(__input);
10294            Bytes::new(&payload_buf)
10295        } else {
10296            Bytes::new(__input)
10297        };
10298        let mut __struct = Self::default();
10299        __struct.time_usec = buf.get_u64_le();
10300        __struct.x_acc = buf.get_f32_le();
10301        __struct.y_acc = buf.get_f32_le();
10302        __struct.z_acc = buf.get_f32_le();
10303        __struct.x_vel = buf.get_f32_le();
10304        __struct.y_vel = buf.get_f32_le();
10305        __struct.z_vel = buf.get_f32_le();
10306        __struct.x_pos = buf.get_f32_le();
10307        __struct.y_pos = buf.get_f32_le();
10308        __struct.z_pos = buf.get_f32_le();
10309        __struct.airspeed = buf.get_f32_le();
10310        for v in &mut __struct.vel_variance {
10311            let val = buf.get_f32_le();
10312            *v = val;
10313        }
10314        for v in &mut __struct.pos_variance {
10315            let val = buf.get_f32_le();
10316            *v = val;
10317        }
10318        for v in &mut __struct.q {
10319            let val = buf.get_f32_le();
10320            *v = val;
10321        }
10322        __struct.roll_rate = buf.get_f32_le();
10323        __struct.pitch_rate = buf.get_f32_le();
10324        __struct.yaw_rate = buf.get_f32_le();
10325        Ok(__struct)
10326    }
10327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10328        let mut __tmp = BytesMut::new(bytes);
10329        #[allow(clippy::absurd_extreme_comparisons)]
10330        #[allow(unused_comparisons)]
10331        if __tmp.remaining() < Self::ENCODED_LEN {
10332            panic!(
10333                "buffer is too small (need {} bytes, but got {})",
10334                Self::ENCODED_LEN,
10335                __tmp.remaining(),
10336            )
10337        }
10338        __tmp.put_u64_le(self.time_usec);
10339        __tmp.put_f32_le(self.x_acc);
10340        __tmp.put_f32_le(self.y_acc);
10341        __tmp.put_f32_le(self.z_acc);
10342        __tmp.put_f32_le(self.x_vel);
10343        __tmp.put_f32_le(self.y_vel);
10344        __tmp.put_f32_le(self.z_vel);
10345        __tmp.put_f32_le(self.x_pos);
10346        __tmp.put_f32_le(self.y_pos);
10347        __tmp.put_f32_le(self.z_pos);
10348        __tmp.put_f32_le(self.airspeed);
10349        for val in &self.vel_variance {
10350            __tmp.put_f32_le(*val);
10351        }
10352        for val in &self.pos_variance {
10353            __tmp.put_f32_le(*val);
10354        }
10355        for val in &self.q {
10356            __tmp.put_f32_le(*val);
10357        }
10358        __tmp.put_f32_le(self.roll_rate);
10359        __tmp.put_f32_le(self.pitch_rate);
10360        __tmp.put_f32_le(self.yaw_rate);
10361        if matches!(version, MavlinkVersion::V2) {
10362            let len = __tmp.len();
10363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10364        } else {
10365            __tmp.len()
10366        }
10367    }
10368}
10369#[doc = "id: 411"]
10370#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10371#[derive(Debug, Clone, PartialEq)]
10372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10374pub struct CURRENT_EVENT_SEQUENCE_DATA {
10375    #[doc = "Sequence number."]
10376    pub sequence: u16,
10377    #[doc = "Flag bitset."]
10378    pub flags: MavEventCurrentSequenceFlags,
10379}
10380impl CURRENT_EVENT_SEQUENCE_DATA {
10381    pub const ENCODED_LEN: usize = 3usize;
10382    pub const DEFAULT: Self = Self {
10383        sequence: 0_u16,
10384        flags: MavEventCurrentSequenceFlags::DEFAULT,
10385    };
10386    #[cfg(feature = "arbitrary")]
10387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10388        use arbitrary::{Arbitrary, Unstructured};
10389        let mut buf = [0u8; 1024];
10390        rng.fill_bytes(&mut buf);
10391        let mut unstructured = Unstructured::new(&buf);
10392        Self::arbitrary(&mut unstructured).unwrap_or_default()
10393    }
10394}
10395impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10396    fn default() -> Self {
10397        Self::DEFAULT.clone()
10398    }
10399}
10400impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10401    type Message = MavMessage;
10402    const ID: u32 = 411u32;
10403    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10404    const EXTRA_CRC: u8 = 106u8;
10405    const ENCODED_LEN: usize = 3usize;
10406    fn deser(
10407        _version: MavlinkVersion,
10408        __input: &[u8],
10409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10410        let avail_len = __input.len();
10411        let mut payload_buf = [0; Self::ENCODED_LEN];
10412        let mut buf = if avail_len < Self::ENCODED_LEN {
10413            payload_buf[0..avail_len].copy_from_slice(__input);
10414            Bytes::new(&payload_buf)
10415        } else {
10416            Bytes::new(__input)
10417        };
10418        let mut __struct = Self::default();
10419        __struct.sequence = buf.get_u16_le();
10420        let tmp = buf.get_u8();
10421        __struct.flags =
10422            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10423                enum_type: "MavEventCurrentSequenceFlags",
10424                value: tmp as u32,
10425            })?;
10426        Ok(__struct)
10427    }
10428    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10429        let mut __tmp = BytesMut::new(bytes);
10430        #[allow(clippy::absurd_extreme_comparisons)]
10431        #[allow(unused_comparisons)]
10432        if __tmp.remaining() < Self::ENCODED_LEN {
10433            panic!(
10434                "buffer is too small (need {} bytes, but got {})",
10435                Self::ENCODED_LEN,
10436                __tmp.remaining(),
10437            )
10438        }
10439        __tmp.put_u16_le(self.sequence);
10440        __tmp.put_u8(self.flags as u8);
10441        if matches!(version, MavlinkVersion::V2) {
10442            let len = __tmp.len();
10443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10444        } else {
10445            __tmp.len()
10446        }
10447    }
10448}
10449#[doc = "id: 436"]
10450#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10451#[derive(Debug, Clone, PartialEq)]
10452#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10454pub struct CURRENT_MODE_DATA {
10455    #[doc = "A bitfield for use for autopilot-specific flags"]
10456    pub custom_mode: u32,
10457    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10458    pub intended_custom_mode: u32,
10459    #[doc = "Standard mode."]
10460    pub standard_mode: MavStandardMode,
10461}
10462impl CURRENT_MODE_DATA {
10463    pub const ENCODED_LEN: usize = 9usize;
10464    pub const DEFAULT: Self = Self {
10465        custom_mode: 0_u32,
10466        intended_custom_mode: 0_u32,
10467        standard_mode: MavStandardMode::DEFAULT,
10468    };
10469    #[cfg(feature = "arbitrary")]
10470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10471        use arbitrary::{Arbitrary, Unstructured};
10472        let mut buf = [0u8; 1024];
10473        rng.fill_bytes(&mut buf);
10474        let mut unstructured = Unstructured::new(&buf);
10475        Self::arbitrary(&mut unstructured).unwrap_or_default()
10476    }
10477}
10478impl Default for CURRENT_MODE_DATA {
10479    fn default() -> Self {
10480        Self::DEFAULT.clone()
10481    }
10482}
10483impl MessageData for CURRENT_MODE_DATA {
10484    type Message = MavMessage;
10485    const ID: u32 = 436u32;
10486    const NAME: &'static str = "CURRENT_MODE";
10487    const EXTRA_CRC: u8 = 193u8;
10488    const ENCODED_LEN: usize = 9usize;
10489    fn deser(
10490        _version: MavlinkVersion,
10491        __input: &[u8],
10492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10493        let avail_len = __input.len();
10494        let mut payload_buf = [0; Self::ENCODED_LEN];
10495        let mut buf = if avail_len < Self::ENCODED_LEN {
10496            payload_buf[0..avail_len].copy_from_slice(__input);
10497            Bytes::new(&payload_buf)
10498        } else {
10499            Bytes::new(__input)
10500        };
10501        let mut __struct = Self::default();
10502        __struct.custom_mode = buf.get_u32_le();
10503        __struct.intended_custom_mode = buf.get_u32_le();
10504        let tmp = buf.get_u8();
10505        __struct.standard_mode =
10506            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10507                enum_type: "MavStandardMode",
10508                value: tmp as u32,
10509            })?;
10510        Ok(__struct)
10511    }
10512    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10513        let mut __tmp = BytesMut::new(bytes);
10514        #[allow(clippy::absurd_extreme_comparisons)]
10515        #[allow(unused_comparisons)]
10516        if __tmp.remaining() < Self::ENCODED_LEN {
10517            panic!(
10518                "buffer is too small (need {} bytes, but got {})",
10519                Self::ENCODED_LEN,
10520                __tmp.remaining(),
10521            )
10522        }
10523        __tmp.put_u32_le(self.custom_mode);
10524        __tmp.put_u32_le(self.intended_custom_mode);
10525        __tmp.put_u8(self.standard_mode as u8);
10526        if matches!(version, MavlinkVersion::V2) {
10527            let len = __tmp.len();
10528            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10529        } else {
10530            __tmp.len()
10531        }
10532    }
10533}
10534#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10535#[doc = "id: 67"]
10536#[doc = "Data stream status information."]
10537#[derive(Debug, Clone, PartialEq)]
10538#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10540pub struct DATA_STREAM_DATA {
10541    #[doc = "The message rate"]
10542    pub message_rate: u16,
10543    #[doc = "The ID of the requested data stream"]
10544    pub stream_id: u8,
10545    #[doc = "1 stream is enabled, 0 stream is stopped."]
10546    pub on_off: u8,
10547}
10548impl DATA_STREAM_DATA {
10549    pub const ENCODED_LEN: usize = 4usize;
10550    pub const DEFAULT: Self = Self {
10551        message_rate: 0_u16,
10552        stream_id: 0_u8,
10553        on_off: 0_u8,
10554    };
10555    #[cfg(feature = "arbitrary")]
10556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10557        use arbitrary::{Arbitrary, Unstructured};
10558        let mut buf = [0u8; 1024];
10559        rng.fill_bytes(&mut buf);
10560        let mut unstructured = Unstructured::new(&buf);
10561        Self::arbitrary(&mut unstructured).unwrap_or_default()
10562    }
10563}
10564impl Default for DATA_STREAM_DATA {
10565    fn default() -> Self {
10566        Self::DEFAULT.clone()
10567    }
10568}
10569impl MessageData for DATA_STREAM_DATA {
10570    type Message = MavMessage;
10571    const ID: u32 = 67u32;
10572    const NAME: &'static str = "DATA_STREAM";
10573    const EXTRA_CRC: u8 = 21u8;
10574    const ENCODED_LEN: usize = 4usize;
10575    fn deser(
10576        _version: MavlinkVersion,
10577        __input: &[u8],
10578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10579        let avail_len = __input.len();
10580        let mut payload_buf = [0; Self::ENCODED_LEN];
10581        let mut buf = if avail_len < Self::ENCODED_LEN {
10582            payload_buf[0..avail_len].copy_from_slice(__input);
10583            Bytes::new(&payload_buf)
10584        } else {
10585            Bytes::new(__input)
10586        };
10587        let mut __struct = Self::default();
10588        __struct.message_rate = buf.get_u16_le();
10589        __struct.stream_id = buf.get_u8();
10590        __struct.on_off = buf.get_u8();
10591        Ok(__struct)
10592    }
10593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10594        let mut __tmp = BytesMut::new(bytes);
10595        #[allow(clippy::absurd_extreme_comparisons)]
10596        #[allow(unused_comparisons)]
10597        if __tmp.remaining() < Self::ENCODED_LEN {
10598            panic!(
10599                "buffer is too small (need {} bytes, but got {})",
10600                Self::ENCODED_LEN,
10601                __tmp.remaining(),
10602            )
10603        }
10604        __tmp.put_u16_le(self.message_rate);
10605        __tmp.put_u8(self.stream_id);
10606        __tmp.put_u8(self.on_off);
10607        if matches!(version, MavlinkVersion::V2) {
10608            let len = __tmp.len();
10609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10610        } else {
10611            __tmp.len()
10612        }
10613    }
10614}
10615#[doc = "id: 130"]
10616#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10617#[derive(Debug, Clone, PartialEq)]
10618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10620pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10621    #[doc = "total data size (set on ACK only)."]
10622    pub size: u32,
10623    #[doc = "Width of a matrix or image."]
10624    pub width: u16,
10625    #[doc = "Height of a matrix or image."]
10626    pub height: u16,
10627    #[doc = "Number of packets being sent (set on ACK only)."]
10628    pub packets: u16,
10629    #[doc = "Type of requested/acknowledged data."]
10630    pub mavtype: MavlinkDataStreamType,
10631    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10632    pub payload: u8,
10633    #[doc = "JPEG quality. Values: [1-100]."]
10634    pub jpg_quality: u8,
10635}
10636impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10637    pub const ENCODED_LEN: usize = 13usize;
10638    pub const DEFAULT: Self = Self {
10639        size: 0_u32,
10640        width: 0_u16,
10641        height: 0_u16,
10642        packets: 0_u16,
10643        mavtype: MavlinkDataStreamType::DEFAULT,
10644        payload: 0_u8,
10645        jpg_quality: 0_u8,
10646    };
10647    #[cfg(feature = "arbitrary")]
10648    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10649        use arbitrary::{Arbitrary, Unstructured};
10650        let mut buf = [0u8; 1024];
10651        rng.fill_bytes(&mut buf);
10652        let mut unstructured = Unstructured::new(&buf);
10653        Self::arbitrary(&mut unstructured).unwrap_or_default()
10654    }
10655}
10656impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10657    fn default() -> Self {
10658        Self::DEFAULT.clone()
10659    }
10660}
10661impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10662    type Message = MavMessage;
10663    const ID: u32 = 130u32;
10664    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10665    const EXTRA_CRC: u8 = 29u8;
10666    const ENCODED_LEN: usize = 13usize;
10667    fn deser(
10668        _version: MavlinkVersion,
10669        __input: &[u8],
10670    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10671        let avail_len = __input.len();
10672        let mut payload_buf = [0; Self::ENCODED_LEN];
10673        let mut buf = if avail_len < Self::ENCODED_LEN {
10674            payload_buf[0..avail_len].copy_from_slice(__input);
10675            Bytes::new(&payload_buf)
10676        } else {
10677            Bytes::new(__input)
10678        };
10679        let mut __struct = Self::default();
10680        __struct.size = buf.get_u32_le();
10681        __struct.width = buf.get_u16_le();
10682        __struct.height = buf.get_u16_le();
10683        __struct.packets = buf.get_u16_le();
10684        let tmp = buf.get_u8();
10685        __struct.mavtype =
10686            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10687                enum_type: "MavlinkDataStreamType",
10688                value: tmp as u32,
10689            })?;
10690        __struct.payload = buf.get_u8();
10691        __struct.jpg_quality = buf.get_u8();
10692        Ok(__struct)
10693    }
10694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10695        let mut __tmp = BytesMut::new(bytes);
10696        #[allow(clippy::absurd_extreme_comparisons)]
10697        #[allow(unused_comparisons)]
10698        if __tmp.remaining() < Self::ENCODED_LEN {
10699            panic!(
10700                "buffer is too small (need {} bytes, but got {})",
10701                Self::ENCODED_LEN,
10702                __tmp.remaining(),
10703            )
10704        }
10705        __tmp.put_u32_le(self.size);
10706        __tmp.put_u16_le(self.width);
10707        __tmp.put_u16_le(self.height);
10708        __tmp.put_u16_le(self.packets);
10709        __tmp.put_u8(self.mavtype as u8);
10710        __tmp.put_u8(self.payload);
10711        __tmp.put_u8(self.jpg_quality);
10712        if matches!(version, MavlinkVersion::V2) {
10713            let len = __tmp.len();
10714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10715        } else {
10716            __tmp.len()
10717        }
10718    }
10719}
10720#[doc = "id: 254"]
10721#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10722#[derive(Debug, Clone, PartialEq)]
10723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10725pub struct DEBUG_DATA {
10726    #[doc = "Timestamp (time since system boot)."]
10727    pub time_boot_ms: u32,
10728    #[doc = "DEBUG value"]
10729    pub value: f32,
10730    #[doc = "index of debug variable"]
10731    pub ind: u8,
10732}
10733impl DEBUG_DATA {
10734    pub const ENCODED_LEN: usize = 9usize;
10735    pub const DEFAULT: Self = Self {
10736        time_boot_ms: 0_u32,
10737        value: 0.0_f32,
10738        ind: 0_u8,
10739    };
10740    #[cfg(feature = "arbitrary")]
10741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10742        use arbitrary::{Arbitrary, Unstructured};
10743        let mut buf = [0u8; 1024];
10744        rng.fill_bytes(&mut buf);
10745        let mut unstructured = Unstructured::new(&buf);
10746        Self::arbitrary(&mut unstructured).unwrap_or_default()
10747    }
10748}
10749impl Default for DEBUG_DATA {
10750    fn default() -> Self {
10751        Self::DEFAULT.clone()
10752    }
10753}
10754impl MessageData for DEBUG_DATA {
10755    type Message = MavMessage;
10756    const ID: u32 = 254u32;
10757    const NAME: &'static str = "DEBUG";
10758    const EXTRA_CRC: u8 = 46u8;
10759    const ENCODED_LEN: usize = 9usize;
10760    fn deser(
10761        _version: MavlinkVersion,
10762        __input: &[u8],
10763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10764        let avail_len = __input.len();
10765        let mut payload_buf = [0; Self::ENCODED_LEN];
10766        let mut buf = if avail_len < Self::ENCODED_LEN {
10767            payload_buf[0..avail_len].copy_from_slice(__input);
10768            Bytes::new(&payload_buf)
10769        } else {
10770            Bytes::new(__input)
10771        };
10772        let mut __struct = Self::default();
10773        __struct.time_boot_ms = buf.get_u32_le();
10774        __struct.value = buf.get_f32_le();
10775        __struct.ind = buf.get_u8();
10776        Ok(__struct)
10777    }
10778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10779        let mut __tmp = BytesMut::new(bytes);
10780        #[allow(clippy::absurd_extreme_comparisons)]
10781        #[allow(unused_comparisons)]
10782        if __tmp.remaining() < Self::ENCODED_LEN {
10783            panic!(
10784                "buffer is too small (need {} bytes, but got {})",
10785                Self::ENCODED_LEN,
10786                __tmp.remaining(),
10787            )
10788        }
10789        __tmp.put_u32_le(self.time_boot_ms);
10790        __tmp.put_f32_le(self.value);
10791        __tmp.put_u8(self.ind);
10792        if matches!(version, MavlinkVersion::V2) {
10793            let len = __tmp.len();
10794            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10795        } else {
10796            __tmp.len()
10797        }
10798    }
10799}
10800#[doc = "id: 350"]
10801#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10802#[derive(Debug, Clone, PartialEq)]
10803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10805pub struct DEBUG_FLOAT_ARRAY_DATA {
10806    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10807    pub time_usec: u64,
10808    #[doc = "Unique ID used to discriminate between arrays"]
10809    pub array_id: u16,
10810    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10811    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10812    pub name: [u8; 10],
10813    #[doc = "data"]
10814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10816    pub data: [f32; 58],
10817}
10818impl DEBUG_FLOAT_ARRAY_DATA {
10819    pub const ENCODED_LEN: usize = 252usize;
10820    pub const DEFAULT: Self = Self {
10821        time_usec: 0_u64,
10822        array_id: 0_u16,
10823        name: [0_u8; 10usize],
10824        data: [0.0_f32; 58usize],
10825    };
10826    #[cfg(feature = "arbitrary")]
10827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10828        use arbitrary::{Arbitrary, Unstructured};
10829        let mut buf = [0u8; 1024];
10830        rng.fill_bytes(&mut buf);
10831        let mut unstructured = Unstructured::new(&buf);
10832        Self::arbitrary(&mut unstructured).unwrap_or_default()
10833    }
10834}
10835impl Default for DEBUG_FLOAT_ARRAY_DATA {
10836    fn default() -> Self {
10837        Self::DEFAULT.clone()
10838    }
10839}
10840impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10841    type Message = MavMessage;
10842    const ID: u32 = 350u32;
10843    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10844    const EXTRA_CRC: u8 = 232u8;
10845    const ENCODED_LEN: usize = 252usize;
10846    fn deser(
10847        _version: MavlinkVersion,
10848        __input: &[u8],
10849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10850        let avail_len = __input.len();
10851        let mut payload_buf = [0; Self::ENCODED_LEN];
10852        let mut buf = if avail_len < Self::ENCODED_LEN {
10853            payload_buf[0..avail_len].copy_from_slice(__input);
10854            Bytes::new(&payload_buf)
10855        } else {
10856            Bytes::new(__input)
10857        };
10858        let mut __struct = Self::default();
10859        __struct.time_usec = buf.get_u64_le();
10860        __struct.array_id = buf.get_u16_le();
10861        for v in &mut __struct.name {
10862            let val = buf.get_u8();
10863            *v = val;
10864        }
10865        for v in &mut __struct.data {
10866            let val = buf.get_f32_le();
10867            *v = val;
10868        }
10869        Ok(__struct)
10870    }
10871    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10872        let mut __tmp = BytesMut::new(bytes);
10873        #[allow(clippy::absurd_extreme_comparisons)]
10874        #[allow(unused_comparisons)]
10875        if __tmp.remaining() < Self::ENCODED_LEN {
10876            panic!(
10877                "buffer is too small (need {} bytes, but got {})",
10878                Self::ENCODED_LEN,
10879                __tmp.remaining(),
10880            )
10881        }
10882        __tmp.put_u64_le(self.time_usec);
10883        __tmp.put_u16_le(self.array_id);
10884        for val in &self.name {
10885            __tmp.put_u8(*val);
10886        }
10887        for val in &self.data {
10888            __tmp.put_f32_le(*val);
10889        }
10890        if matches!(version, MavlinkVersion::V2) {
10891            let len = __tmp.len();
10892            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10893        } else {
10894            __tmp.len()
10895        }
10896    }
10897}
10898#[doc = "id: 250"]
10899#[doc = "To debug something using a named 3D vector."]
10900#[derive(Debug, Clone, PartialEq)]
10901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10903pub struct DEBUG_VECT_DATA {
10904    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10905    pub time_usec: u64,
10906    #[doc = "x"]
10907    pub x: f32,
10908    #[doc = "y"]
10909    pub y: f32,
10910    #[doc = "z"]
10911    pub z: f32,
10912    #[doc = "Name"]
10913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10914    pub name: [u8; 10],
10915}
10916impl DEBUG_VECT_DATA {
10917    pub const ENCODED_LEN: usize = 30usize;
10918    pub const DEFAULT: Self = Self {
10919        time_usec: 0_u64,
10920        x: 0.0_f32,
10921        y: 0.0_f32,
10922        z: 0.0_f32,
10923        name: [0_u8; 10usize],
10924    };
10925    #[cfg(feature = "arbitrary")]
10926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10927        use arbitrary::{Arbitrary, Unstructured};
10928        let mut buf = [0u8; 1024];
10929        rng.fill_bytes(&mut buf);
10930        let mut unstructured = Unstructured::new(&buf);
10931        Self::arbitrary(&mut unstructured).unwrap_or_default()
10932    }
10933}
10934impl Default for DEBUG_VECT_DATA {
10935    fn default() -> Self {
10936        Self::DEFAULT.clone()
10937    }
10938}
10939impl MessageData for DEBUG_VECT_DATA {
10940    type Message = MavMessage;
10941    const ID: u32 = 250u32;
10942    const NAME: &'static str = "DEBUG_VECT";
10943    const EXTRA_CRC: u8 = 49u8;
10944    const ENCODED_LEN: usize = 30usize;
10945    fn deser(
10946        _version: MavlinkVersion,
10947        __input: &[u8],
10948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10949        let avail_len = __input.len();
10950        let mut payload_buf = [0; Self::ENCODED_LEN];
10951        let mut buf = if avail_len < Self::ENCODED_LEN {
10952            payload_buf[0..avail_len].copy_from_slice(__input);
10953            Bytes::new(&payload_buf)
10954        } else {
10955            Bytes::new(__input)
10956        };
10957        let mut __struct = Self::default();
10958        __struct.time_usec = buf.get_u64_le();
10959        __struct.x = buf.get_f32_le();
10960        __struct.y = buf.get_f32_le();
10961        __struct.z = buf.get_f32_le();
10962        for v in &mut __struct.name {
10963            let val = buf.get_u8();
10964            *v = val;
10965        }
10966        Ok(__struct)
10967    }
10968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10969        let mut __tmp = BytesMut::new(bytes);
10970        #[allow(clippy::absurd_extreme_comparisons)]
10971        #[allow(unused_comparisons)]
10972        if __tmp.remaining() < Self::ENCODED_LEN {
10973            panic!(
10974                "buffer is too small (need {} bytes, but got {})",
10975                Self::ENCODED_LEN,
10976                __tmp.remaining(),
10977            )
10978        }
10979        __tmp.put_u64_le(self.time_usec);
10980        __tmp.put_f32_le(self.x);
10981        __tmp.put_f32_le(self.y);
10982        __tmp.put_f32_le(self.z);
10983        for val in &self.name {
10984            __tmp.put_u8(*val);
10985        }
10986        if matches!(version, MavlinkVersion::V2) {
10987            let len = __tmp.len();
10988            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10989        } else {
10990            __tmp.len()
10991        }
10992    }
10993}
10994#[doc = "id: 132"]
10995#[doc = "Distance sensor information for an onboard rangefinder."]
10996#[derive(Debug, Clone, PartialEq)]
10997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10998#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10999pub struct DISTANCE_SENSOR_DATA {
11000    #[doc = "Timestamp (time since system boot)."]
11001    pub time_boot_ms: u32,
11002    #[doc = "Minimum distance the sensor can measure"]
11003    pub min_distance: u16,
11004    #[doc = "Maximum distance the sensor can measure"]
11005    pub max_distance: u16,
11006    #[doc = "Current distance reading"]
11007    pub current_distance: u16,
11008    #[doc = "Type of distance sensor."]
11009    pub mavtype: MavDistanceSensor,
11010    #[doc = "Onboard ID of the sensor"]
11011    pub id: u8,
11012    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11013    pub orientation: MavSensorOrientation,
11014    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11015    pub covariance: u8,
11016    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11017    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11018    pub horizontal_fov: f32,
11019    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11020    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11021    pub vertical_fov: f32,
11022    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11023    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11024    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11025    pub quaternion: [f32; 4],
11026    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11027    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11028    pub signal_quality: u8,
11029}
11030impl DISTANCE_SENSOR_DATA {
11031    pub const ENCODED_LEN: usize = 39usize;
11032    pub const DEFAULT: Self = Self {
11033        time_boot_ms: 0_u32,
11034        min_distance: 0_u16,
11035        max_distance: 0_u16,
11036        current_distance: 0_u16,
11037        mavtype: MavDistanceSensor::DEFAULT,
11038        id: 0_u8,
11039        orientation: MavSensorOrientation::DEFAULT,
11040        covariance: 0_u8,
11041        horizontal_fov: 0.0_f32,
11042        vertical_fov: 0.0_f32,
11043        quaternion: [0.0_f32; 4usize],
11044        signal_quality: 0_u8,
11045    };
11046    #[cfg(feature = "arbitrary")]
11047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11048        use arbitrary::{Arbitrary, Unstructured};
11049        let mut buf = [0u8; 1024];
11050        rng.fill_bytes(&mut buf);
11051        let mut unstructured = Unstructured::new(&buf);
11052        Self::arbitrary(&mut unstructured).unwrap_or_default()
11053    }
11054}
11055impl Default for DISTANCE_SENSOR_DATA {
11056    fn default() -> Self {
11057        Self::DEFAULT.clone()
11058    }
11059}
11060impl MessageData for DISTANCE_SENSOR_DATA {
11061    type Message = MavMessage;
11062    const ID: u32 = 132u32;
11063    const NAME: &'static str = "DISTANCE_SENSOR";
11064    const EXTRA_CRC: u8 = 85u8;
11065    const ENCODED_LEN: usize = 39usize;
11066    fn deser(
11067        _version: MavlinkVersion,
11068        __input: &[u8],
11069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11070        let avail_len = __input.len();
11071        let mut payload_buf = [0; Self::ENCODED_LEN];
11072        let mut buf = if avail_len < Self::ENCODED_LEN {
11073            payload_buf[0..avail_len].copy_from_slice(__input);
11074            Bytes::new(&payload_buf)
11075        } else {
11076            Bytes::new(__input)
11077        };
11078        let mut __struct = Self::default();
11079        __struct.time_boot_ms = buf.get_u32_le();
11080        __struct.min_distance = buf.get_u16_le();
11081        __struct.max_distance = buf.get_u16_le();
11082        __struct.current_distance = buf.get_u16_le();
11083        let tmp = buf.get_u8();
11084        __struct.mavtype =
11085            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11086                enum_type: "MavDistanceSensor",
11087                value: tmp as u32,
11088            })?;
11089        __struct.id = buf.get_u8();
11090        let tmp = buf.get_u8();
11091        __struct.orientation =
11092            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11093                enum_type: "MavSensorOrientation",
11094                value: tmp as u32,
11095            })?;
11096        __struct.covariance = buf.get_u8();
11097        __struct.horizontal_fov = buf.get_f32_le();
11098        __struct.vertical_fov = buf.get_f32_le();
11099        for v in &mut __struct.quaternion {
11100            let val = buf.get_f32_le();
11101            *v = val;
11102        }
11103        __struct.signal_quality = buf.get_u8();
11104        Ok(__struct)
11105    }
11106    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11107        let mut __tmp = BytesMut::new(bytes);
11108        #[allow(clippy::absurd_extreme_comparisons)]
11109        #[allow(unused_comparisons)]
11110        if __tmp.remaining() < Self::ENCODED_LEN {
11111            panic!(
11112                "buffer is too small (need {} bytes, but got {})",
11113                Self::ENCODED_LEN,
11114                __tmp.remaining(),
11115            )
11116        }
11117        __tmp.put_u32_le(self.time_boot_ms);
11118        __tmp.put_u16_le(self.min_distance);
11119        __tmp.put_u16_le(self.max_distance);
11120        __tmp.put_u16_le(self.current_distance);
11121        __tmp.put_u8(self.mavtype as u8);
11122        __tmp.put_u8(self.id);
11123        __tmp.put_u8(self.orientation as u8);
11124        __tmp.put_u8(self.covariance);
11125        __tmp.put_f32_le(self.horizontal_fov);
11126        __tmp.put_f32_le(self.vertical_fov);
11127        for val in &self.quaternion {
11128            __tmp.put_f32_le(*val);
11129        }
11130        __tmp.put_u8(self.signal_quality);
11131        if matches!(version, MavlinkVersion::V2) {
11132            let len = __tmp.len();
11133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11134        } else {
11135            __tmp.len()
11136        }
11137    }
11138}
11139#[doc = "id: 225"]
11140#[doc = "EFI status output."]
11141#[derive(Debug, Clone, PartialEq)]
11142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11144pub struct EFI_STATUS_DATA {
11145    #[doc = "ECU index"]
11146    pub ecu_index: f32,
11147    #[doc = "RPM"]
11148    pub rpm: f32,
11149    #[doc = "Fuel consumed"]
11150    pub fuel_consumed: f32,
11151    #[doc = "Fuel flow rate"]
11152    pub fuel_flow: f32,
11153    #[doc = "Engine load"]
11154    pub engine_load: f32,
11155    #[doc = "Throttle position"]
11156    pub throttle_position: f32,
11157    #[doc = "Spark dwell time"]
11158    pub spark_dwell_time: f32,
11159    #[doc = "Barometric pressure"]
11160    pub barometric_pressure: f32,
11161    #[doc = "Intake manifold pressure("]
11162    pub intake_manifold_pressure: f32,
11163    #[doc = "Intake manifold temperature"]
11164    pub intake_manifold_temperature: f32,
11165    #[doc = "Cylinder head temperature"]
11166    pub cylinder_head_temperature: f32,
11167    #[doc = "Ignition timing (Crank angle degrees)"]
11168    pub ignition_timing: f32,
11169    #[doc = "Injection time"]
11170    pub injection_time: f32,
11171    #[doc = "Exhaust gas temperature"]
11172    pub exhaust_gas_temperature: f32,
11173    #[doc = "Output throttle"]
11174    pub throttle_out: f32,
11175    #[doc = "Pressure/temperature compensation"]
11176    pub pt_compensation: f32,
11177    #[doc = "EFI health status"]
11178    pub health: u8,
11179    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11180    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11181    pub ignition_voltage: f32,
11182    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11184    pub fuel_pressure: f32,
11185}
11186impl EFI_STATUS_DATA {
11187    pub const ENCODED_LEN: usize = 73usize;
11188    pub const DEFAULT: Self = Self {
11189        ecu_index: 0.0_f32,
11190        rpm: 0.0_f32,
11191        fuel_consumed: 0.0_f32,
11192        fuel_flow: 0.0_f32,
11193        engine_load: 0.0_f32,
11194        throttle_position: 0.0_f32,
11195        spark_dwell_time: 0.0_f32,
11196        barometric_pressure: 0.0_f32,
11197        intake_manifold_pressure: 0.0_f32,
11198        intake_manifold_temperature: 0.0_f32,
11199        cylinder_head_temperature: 0.0_f32,
11200        ignition_timing: 0.0_f32,
11201        injection_time: 0.0_f32,
11202        exhaust_gas_temperature: 0.0_f32,
11203        throttle_out: 0.0_f32,
11204        pt_compensation: 0.0_f32,
11205        health: 0_u8,
11206        ignition_voltage: 0.0_f32,
11207        fuel_pressure: 0.0_f32,
11208    };
11209    #[cfg(feature = "arbitrary")]
11210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11211        use arbitrary::{Arbitrary, Unstructured};
11212        let mut buf = [0u8; 1024];
11213        rng.fill_bytes(&mut buf);
11214        let mut unstructured = Unstructured::new(&buf);
11215        Self::arbitrary(&mut unstructured).unwrap_or_default()
11216    }
11217}
11218impl Default for EFI_STATUS_DATA {
11219    fn default() -> Self {
11220        Self::DEFAULT.clone()
11221    }
11222}
11223impl MessageData for EFI_STATUS_DATA {
11224    type Message = MavMessage;
11225    const ID: u32 = 225u32;
11226    const NAME: &'static str = "EFI_STATUS";
11227    const EXTRA_CRC: u8 = 208u8;
11228    const ENCODED_LEN: usize = 73usize;
11229    fn deser(
11230        _version: MavlinkVersion,
11231        __input: &[u8],
11232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11233        let avail_len = __input.len();
11234        let mut payload_buf = [0; Self::ENCODED_LEN];
11235        let mut buf = if avail_len < Self::ENCODED_LEN {
11236            payload_buf[0..avail_len].copy_from_slice(__input);
11237            Bytes::new(&payload_buf)
11238        } else {
11239            Bytes::new(__input)
11240        };
11241        let mut __struct = Self::default();
11242        __struct.ecu_index = buf.get_f32_le();
11243        __struct.rpm = buf.get_f32_le();
11244        __struct.fuel_consumed = buf.get_f32_le();
11245        __struct.fuel_flow = buf.get_f32_le();
11246        __struct.engine_load = buf.get_f32_le();
11247        __struct.throttle_position = buf.get_f32_le();
11248        __struct.spark_dwell_time = buf.get_f32_le();
11249        __struct.barometric_pressure = buf.get_f32_le();
11250        __struct.intake_manifold_pressure = buf.get_f32_le();
11251        __struct.intake_manifold_temperature = buf.get_f32_le();
11252        __struct.cylinder_head_temperature = buf.get_f32_le();
11253        __struct.ignition_timing = buf.get_f32_le();
11254        __struct.injection_time = buf.get_f32_le();
11255        __struct.exhaust_gas_temperature = buf.get_f32_le();
11256        __struct.throttle_out = buf.get_f32_le();
11257        __struct.pt_compensation = buf.get_f32_le();
11258        __struct.health = buf.get_u8();
11259        __struct.ignition_voltage = buf.get_f32_le();
11260        __struct.fuel_pressure = buf.get_f32_le();
11261        Ok(__struct)
11262    }
11263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11264        let mut __tmp = BytesMut::new(bytes);
11265        #[allow(clippy::absurd_extreme_comparisons)]
11266        #[allow(unused_comparisons)]
11267        if __tmp.remaining() < Self::ENCODED_LEN {
11268            panic!(
11269                "buffer is too small (need {} bytes, but got {})",
11270                Self::ENCODED_LEN,
11271                __tmp.remaining(),
11272            )
11273        }
11274        __tmp.put_f32_le(self.ecu_index);
11275        __tmp.put_f32_le(self.rpm);
11276        __tmp.put_f32_le(self.fuel_consumed);
11277        __tmp.put_f32_le(self.fuel_flow);
11278        __tmp.put_f32_le(self.engine_load);
11279        __tmp.put_f32_le(self.throttle_position);
11280        __tmp.put_f32_le(self.spark_dwell_time);
11281        __tmp.put_f32_le(self.barometric_pressure);
11282        __tmp.put_f32_le(self.intake_manifold_pressure);
11283        __tmp.put_f32_le(self.intake_manifold_temperature);
11284        __tmp.put_f32_le(self.cylinder_head_temperature);
11285        __tmp.put_f32_le(self.ignition_timing);
11286        __tmp.put_f32_le(self.injection_time);
11287        __tmp.put_f32_le(self.exhaust_gas_temperature);
11288        __tmp.put_f32_le(self.throttle_out);
11289        __tmp.put_f32_le(self.pt_compensation);
11290        __tmp.put_u8(self.health);
11291        __tmp.put_f32_le(self.ignition_voltage);
11292        __tmp.put_f32_le(self.fuel_pressure);
11293        if matches!(version, MavlinkVersion::V2) {
11294            let len = __tmp.len();
11295            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11296        } else {
11297            __tmp.len()
11298        }
11299    }
11300}
11301#[doc = "id: 131"]
11302#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11303#[derive(Debug, Clone, PartialEq)]
11304#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11306pub struct ENCAPSULATED_DATA_DATA {
11307    #[doc = "sequence number (starting with 0 on every transmission)"]
11308    pub seqnr: u16,
11309    #[doc = "image data bytes"]
11310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11311    pub data: [u8; 253],
11312}
11313impl ENCAPSULATED_DATA_DATA {
11314    pub const ENCODED_LEN: usize = 255usize;
11315    pub const DEFAULT: Self = Self {
11316        seqnr: 0_u16,
11317        data: [0_u8; 253usize],
11318    };
11319    #[cfg(feature = "arbitrary")]
11320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11321        use arbitrary::{Arbitrary, Unstructured};
11322        let mut buf = [0u8; 1024];
11323        rng.fill_bytes(&mut buf);
11324        let mut unstructured = Unstructured::new(&buf);
11325        Self::arbitrary(&mut unstructured).unwrap_or_default()
11326    }
11327}
11328impl Default for ENCAPSULATED_DATA_DATA {
11329    fn default() -> Self {
11330        Self::DEFAULT.clone()
11331    }
11332}
11333impl MessageData for ENCAPSULATED_DATA_DATA {
11334    type Message = MavMessage;
11335    const ID: u32 = 131u32;
11336    const NAME: &'static str = "ENCAPSULATED_DATA";
11337    const EXTRA_CRC: u8 = 223u8;
11338    const ENCODED_LEN: usize = 255usize;
11339    fn deser(
11340        _version: MavlinkVersion,
11341        __input: &[u8],
11342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11343        let avail_len = __input.len();
11344        let mut payload_buf = [0; Self::ENCODED_LEN];
11345        let mut buf = if avail_len < Self::ENCODED_LEN {
11346            payload_buf[0..avail_len].copy_from_slice(__input);
11347            Bytes::new(&payload_buf)
11348        } else {
11349            Bytes::new(__input)
11350        };
11351        let mut __struct = Self::default();
11352        __struct.seqnr = buf.get_u16_le();
11353        for v in &mut __struct.data {
11354            let val = buf.get_u8();
11355            *v = val;
11356        }
11357        Ok(__struct)
11358    }
11359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11360        let mut __tmp = BytesMut::new(bytes);
11361        #[allow(clippy::absurd_extreme_comparisons)]
11362        #[allow(unused_comparisons)]
11363        if __tmp.remaining() < Self::ENCODED_LEN {
11364            panic!(
11365                "buffer is too small (need {} bytes, but got {})",
11366                Self::ENCODED_LEN,
11367                __tmp.remaining(),
11368            )
11369        }
11370        __tmp.put_u16_le(self.seqnr);
11371        for val in &self.data {
11372            __tmp.put_u8(*val);
11373        }
11374        if matches!(version, MavlinkVersion::V2) {
11375            let len = __tmp.len();
11376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11377        } else {
11378            __tmp.len()
11379        }
11380    }
11381}
11382#[doc = "id: 290"]
11383#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11384#[derive(Debug, Clone, PartialEq)]
11385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11387pub struct ESC_INFO_DATA {
11388    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11389    pub time_usec: u64,
11390    #[doc = "Number of reported errors by each ESC since boot."]
11391    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11392    pub error_count: [u32; 4],
11393    #[doc = "Counter of data packets received."]
11394    pub counter: u16,
11395    #[doc = "Bitmap of ESC failure flags."]
11396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11397    pub failure_flags: [u16; 4],
11398    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11400    pub temperature: [i16; 4],
11401    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11402    pub index: u8,
11403    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11404    pub count: u8,
11405    #[doc = "Connection type protocol for all ESC."]
11406    pub connection_type: EscConnectionType,
11407    #[doc = "Information regarding online/offline status of each ESC."]
11408    pub info: u8,
11409}
11410impl ESC_INFO_DATA {
11411    pub const ENCODED_LEN: usize = 46usize;
11412    pub const DEFAULT: Self = Self {
11413        time_usec: 0_u64,
11414        error_count: [0_u32; 4usize],
11415        counter: 0_u16,
11416        failure_flags: [0_u16; 4usize],
11417        temperature: [0_i16; 4usize],
11418        index: 0_u8,
11419        count: 0_u8,
11420        connection_type: EscConnectionType::DEFAULT,
11421        info: 0_u8,
11422    };
11423    #[cfg(feature = "arbitrary")]
11424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11425        use arbitrary::{Arbitrary, Unstructured};
11426        let mut buf = [0u8; 1024];
11427        rng.fill_bytes(&mut buf);
11428        let mut unstructured = Unstructured::new(&buf);
11429        Self::arbitrary(&mut unstructured).unwrap_or_default()
11430    }
11431}
11432impl Default for ESC_INFO_DATA {
11433    fn default() -> Self {
11434        Self::DEFAULT.clone()
11435    }
11436}
11437impl MessageData for ESC_INFO_DATA {
11438    type Message = MavMessage;
11439    const ID: u32 = 290u32;
11440    const NAME: &'static str = "ESC_INFO";
11441    const EXTRA_CRC: u8 = 251u8;
11442    const ENCODED_LEN: usize = 46usize;
11443    fn deser(
11444        _version: MavlinkVersion,
11445        __input: &[u8],
11446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11447        let avail_len = __input.len();
11448        let mut payload_buf = [0; Self::ENCODED_LEN];
11449        let mut buf = if avail_len < Self::ENCODED_LEN {
11450            payload_buf[0..avail_len].copy_from_slice(__input);
11451            Bytes::new(&payload_buf)
11452        } else {
11453            Bytes::new(__input)
11454        };
11455        let mut __struct = Self::default();
11456        __struct.time_usec = buf.get_u64_le();
11457        for v in &mut __struct.error_count {
11458            let val = buf.get_u32_le();
11459            *v = val;
11460        }
11461        __struct.counter = buf.get_u16_le();
11462        for v in &mut __struct.failure_flags {
11463            let val = buf.get_u16_le();
11464            *v = val;
11465        }
11466        for v in &mut __struct.temperature {
11467            let val = buf.get_i16_le();
11468            *v = val;
11469        }
11470        __struct.index = buf.get_u8();
11471        __struct.count = buf.get_u8();
11472        let tmp = buf.get_u8();
11473        __struct.connection_type =
11474            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11475                enum_type: "EscConnectionType",
11476                value: tmp as u32,
11477            })?;
11478        __struct.info = buf.get_u8();
11479        Ok(__struct)
11480    }
11481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11482        let mut __tmp = BytesMut::new(bytes);
11483        #[allow(clippy::absurd_extreme_comparisons)]
11484        #[allow(unused_comparisons)]
11485        if __tmp.remaining() < Self::ENCODED_LEN {
11486            panic!(
11487                "buffer is too small (need {} bytes, but got {})",
11488                Self::ENCODED_LEN,
11489                __tmp.remaining(),
11490            )
11491        }
11492        __tmp.put_u64_le(self.time_usec);
11493        for val in &self.error_count {
11494            __tmp.put_u32_le(*val);
11495        }
11496        __tmp.put_u16_le(self.counter);
11497        for val in &self.failure_flags {
11498            __tmp.put_u16_le(*val);
11499        }
11500        for val in &self.temperature {
11501            __tmp.put_i16_le(*val);
11502        }
11503        __tmp.put_u8(self.index);
11504        __tmp.put_u8(self.count);
11505        __tmp.put_u8(self.connection_type as u8);
11506        __tmp.put_u8(self.info);
11507        if matches!(version, MavlinkVersion::V2) {
11508            let len = __tmp.len();
11509            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11510        } else {
11511            __tmp.len()
11512        }
11513    }
11514}
11515#[doc = "id: 291"]
11516#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11517#[derive(Debug, Clone, PartialEq)]
11518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11519#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11520pub struct ESC_STATUS_DATA {
11521    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11522    pub time_usec: u64,
11523    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11524    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11525    pub rpm: [i32; 4],
11526    #[doc = "Voltage measured from each ESC."]
11527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11528    pub voltage: [f32; 4],
11529    #[doc = "Current measured from each ESC."]
11530    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11531    pub current: [f32; 4],
11532    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11533    pub index: u8,
11534}
11535impl ESC_STATUS_DATA {
11536    pub const ENCODED_LEN: usize = 57usize;
11537    pub const DEFAULT: Self = Self {
11538        time_usec: 0_u64,
11539        rpm: [0_i32; 4usize],
11540        voltage: [0.0_f32; 4usize],
11541        current: [0.0_f32; 4usize],
11542        index: 0_u8,
11543    };
11544    #[cfg(feature = "arbitrary")]
11545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11546        use arbitrary::{Arbitrary, Unstructured};
11547        let mut buf = [0u8; 1024];
11548        rng.fill_bytes(&mut buf);
11549        let mut unstructured = Unstructured::new(&buf);
11550        Self::arbitrary(&mut unstructured).unwrap_or_default()
11551    }
11552}
11553impl Default for ESC_STATUS_DATA {
11554    fn default() -> Self {
11555        Self::DEFAULT.clone()
11556    }
11557}
11558impl MessageData for ESC_STATUS_DATA {
11559    type Message = MavMessage;
11560    const ID: u32 = 291u32;
11561    const NAME: &'static str = "ESC_STATUS";
11562    const EXTRA_CRC: u8 = 10u8;
11563    const ENCODED_LEN: usize = 57usize;
11564    fn deser(
11565        _version: MavlinkVersion,
11566        __input: &[u8],
11567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11568        let avail_len = __input.len();
11569        let mut payload_buf = [0; Self::ENCODED_LEN];
11570        let mut buf = if avail_len < Self::ENCODED_LEN {
11571            payload_buf[0..avail_len].copy_from_slice(__input);
11572            Bytes::new(&payload_buf)
11573        } else {
11574            Bytes::new(__input)
11575        };
11576        let mut __struct = Self::default();
11577        __struct.time_usec = buf.get_u64_le();
11578        for v in &mut __struct.rpm {
11579            let val = buf.get_i32_le();
11580            *v = val;
11581        }
11582        for v in &mut __struct.voltage {
11583            let val = buf.get_f32_le();
11584            *v = val;
11585        }
11586        for v in &mut __struct.current {
11587            let val = buf.get_f32_le();
11588            *v = val;
11589        }
11590        __struct.index = buf.get_u8();
11591        Ok(__struct)
11592    }
11593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11594        let mut __tmp = BytesMut::new(bytes);
11595        #[allow(clippy::absurd_extreme_comparisons)]
11596        #[allow(unused_comparisons)]
11597        if __tmp.remaining() < Self::ENCODED_LEN {
11598            panic!(
11599                "buffer is too small (need {} bytes, but got {})",
11600                Self::ENCODED_LEN,
11601                __tmp.remaining(),
11602            )
11603        }
11604        __tmp.put_u64_le(self.time_usec);
11605        for val in &self.rpm {
11606            __tmp.put_i32_le(*val);
11607        }
11608        for val in &self.voltage {
11609            __tmp.put_f32_le(*val);
11610        }
11611        for val in &self.current {
11612            __tmp.put_f32_le(*val);
11613        }
11614        __tmp.put_u8(self.index);
11615        if matches!(version, MavlinkVersion::V2) {
11616            let len = __tmp.len();
11617            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11618        } else {
11619            __tmp.len()
11620        }
11621    }
11622}
11623#[doc = "id: 230"]
11624#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11625#[derive(Debug, Clone, PartialEq)]
11626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11628pub struct ESTIMATOR_STATUS_DATA {
11629    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11630    pub time_usec: u64,
11631    #[doc = "Velocity innovation test ratio"]
11632    pub vel_ratio: f32,
11633    #[doc = "Horizontal position innovation test ratio"]
11634    pub pos_horiz_ratio: f32,
11635    #[doc = "Vertical position innovation test ratio"]
11636    pub pos_vert_ratio: f32,
11637    #[doc = "Magnetometer innovation test ratio"]
11638    pub mag_ratio: f32,
11639    #[doc = "Height above terrain innovation test ratio"]
11640    pub hagl_ratio: f32,
11641    #[doc = "True airspeed innovation test ratio"]
11642    pub tas_ratio: f32,
11643    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11644    pub pos_horiz_accuracy: f32,
11645    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11646    pub pos_vert_accuracy: f32,
11647    #[doc = "Bitmap indicating which EKF outputs are valid."]
11648    pub flags: EstimatorStatusFlags,
11649}
11650impl ESTIMATOR_STATUS_DATA {
11651    pub const ENCODED_LEN: usize = 42usize;
11652    pub const DEFAULT: Self = Self {
11653        time_usec: 0_u64,
11654        vel_ratio: 0.0_f32,
11655        pos_horiz_ratio: 0.0_f32,
11656        pos_vert_ratio: 0.0_f32,
11657        mag_ratio: 0.0_f32,
11658        hagl_ratio: 0.0_f32,
11659        tas_ratio: 0.0_f32,
11660        pos_horiz_accuracy: 0.0_f32,
11661        pos_vert_accuracy: 0.0_f32,
11662        flags: EstimatorStatusFlags::DEFAULT,
11663    };
11664    #[cfg(feature = "arbitrary")]
11665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11666        use arbitrary::{Arbitrary, Unstructured};
11667        let mut buf = [0u8; 1024];
11668        rng.fill_bytes(&mut buf);
11669        let mut unstructured = Unstructured::new(&buf);
11670        Self::arbitrary(&mut unstructured).unwrap_or_default()
11671    }
11672}
11673impl Default for ESTIMATOR_STATUS_DATA {
11674    fn default() -> Self {
11675        Self::DEFAULT.clone()
11676    }
11677}
11678impl MessageData for ESTIMATOR_STATUS_DATA {
11679    type Message = MavMessage;
11680    const ID: u32 = 230u32;
11681    const NAME: &'static str = "ESTIMATOR_STATUS";
11682    const EXTRA_CRC: u8 = 163u8;
11683    const ENCODED_LEN: usize = 42usize;
11684    fn deser(
11685        _version: MavlinkVersion,
11686        __input: &[u8],
11687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11688        let avail_len = __input.len();
11689        let mut payload_buf = [0; Self::ENCODED_LEN];
11690        let mut buf = if avail_len < Self::ENCODED_LEN {
11691            payload_buf[0..avail_len].copy_from_slice(__input);
11692            Bytes::new(&payload_buf)
11693        } else {
11694            Bytes::new(__input)
11695        };
11696        let mut __struct = Self::default();
11697        __struct.time_usec = buf.get_u64_le();
11698        __struct.vel_ratio = buf.get_f32_le();
11699        __struct.pos_horiz_ratio = buf.get_f32_le();
11700        __struct.pos_vert_ratio = buf.get_f32_le();
11701        __struct.mag_ratio = buf.get_f32_le();
11702        __struct.hagl_ratio = buf.get_f32_le();
11703        __struct.tas_ratio = buf.get_f32_le();
11704        __struct.pos_horiz_accuracy = buf.get_f32_le();
11705        __struct.pos_vert_accuracy = buf.get_f32_le();
11706        let tmp = buf.get_u16_le();
11707        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11708            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11709                flag_type: "EstimatorStatusFlags",
11710                value: tmp as u32,
11711            })?;
11712        Ok(__struct)
11713    }
11714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11715        let mut __tmp = BytesMut::new(bytes);
11716        #[allow(clippy::absurd_extreme_comparisons)]
11717        #[allow(unused_comparisons)]
11718        if __tmp.remaining() < Self::ENCODED_LEN {
11719            panic!(
11720                "buffer is too small (need {} bytes, but got {})",
11721                Self::ENCODED_LEN,
11722                __tmp.remaining(),
11723            )
11724        }
11725        __tmp.put_u64_le(self.time_usec);
11726        __tmp.put_f32_le(self.vel_ratio);
11727        __tmp.put_f32_le(self.pos_horiz_ratio);
11728        __tmp.put_f32_le(self.pos_vert_ratio);
11729        __tmp.put_f32_le(self.mag_ratio);
11730        __tmp.put_f32_le(self.hagl_ratio);
11731        __tmp.put_f32_le(self.tas_ratio);
11732        __tmp.put_f32_le(self.pos_horiz_accuracy);
11733        __tmp.put_f32_le(self.pos_vert_accuracy);
11734        __tmp.put_u16_le(self.flags.bits());
11735        if matches!(version, MavlinkVersion::V2) {
11736            let len = __tmp.len();
11737            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11738        } else {
11739            __tmp.len()
11740        }
11741    }
11742}
11743#[doc = "id: 410"]
11744#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11745#[derive(Debug, Clone, PartialEq)]
11746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11748pub struct EVENT_DATA {
11749    #[doc = "Event ID (as defined in the component metadata)"]
11750    pub id: u32,
11751    #[doc = "Timestamp (time since system boot when the event happened)."]
11752    pub event_time_boot_ms: u32,
11753    #[doc = "Sequence number."]
11754    pub sequence: u16,
11755    #[doc = "Component ID"]
11756    pub destination_component: u8,
11757    #[doc = "System ID"]
11758    pub destination_system: u8,
11759    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11760    pub log_levels: u8,
11761    #[doc = "Arguments (depend on event ID)."]
11762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11763    pub arguments: [u8; 40],
11764}
11765impl EVENT_DATA {
11766    pub const ENCODED_LEN: usize = 53usize;
11767    pub const DEFAULT: Self = Self {
11768        id: 0_u32,
11769        event_time_boot_ms: 0_u32,
11770        sequence: 0_u16,
11771        destination_component: 0_u8,
11772        destination_system: 0_u8,
11773        log_levels: 0_u8,
11774        arguments: [0_u8; 40usize],
11775    };
11776    #[cfg(feature = "arbitrary")]
11777    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11778        use arbitrary::{Arbitrary, Unstructured};
11779        let mut buf = [0u8; 1024];
11780        rng.fill_bytes(&mut buf);
11781        let mut unstructured = Unstructured::new(&buf);
11782        Self::arbitrary(&mut unstructured).unwrap_or_default()
11783    }
11784}
11785impl Default for EVENT_DATA {
11786    fn default() -> Self {
11787        Self::DEFAULT.clone()
11788    }
11789}
11790impl MessageData for EVENT_DATA {
11791    type Message = MavMessage;
11792    const ID: u32 = 410u32;
11793    const NAME: &'static str = "EVENT";
11794    const EXTRA_CRC: u8 = 160u8;
11795    const ENCODED_LEN: usize = 53usize;
11796    fn deser(
11797        _version: MavlinkVersion,
11798        __input: &[u8],
11799    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11800        let avail_len = __input.len();
11801        let mut payload_buf = [0; Self::ENCODED_LEN];
11802        let mut buf = if avail_len < Self::ENCODED_LEN {
11803            payload_buf[0..avail_len].copy_from_slice(__input);
11804            Bytes::new(&payload_buf)
11805        } else {
11806            Bytes::new(__input)
11807        };
11808        let mut __struct = Self::default();
11809        __struct.id = buf.get_u32_le();
11810        __struct.event_time_boot_ms = buf.get_u32_le();
11811        __struct.sequence = buf.get_u16_le();
11812        __struct.destination_component = buf.get_u8();
11813        __struct.destination_system = buf.get_u8();
11814        __struct.log_levels = buf.get_u8();
11815        for v in &mut __struct.arguments {
11816            let val = buf.get_u8();
11817            *v = val;
11818        }
11819        Ok(__struct)
11820    }
11821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11822        let mut __tmp = BytesMut::new(bytes);
11823        #[allow(clippy::absurd_extreme_comparisons)]
11824        #[allow(unused_comparisons)]
11825        if __tmp.remaining() < Self::ENCODED_LEN {
11826            panic!(
11827                "buffer is too small (need {} bytes, but got {})",
11828                Self::ENCODED_LEN,
11829                __tmp.remaining(),
11830            )
11831        }
11832        __tmp.put_u32_le(self.id);
11833        __tmp.put_u32_le(self.event_time_boot_ms);
11834        __tmp.put_u16_le(self.sequence);
11835        __tmp.put_u8(self.destination_component);
11836        __tmp.put_u8(self.destination_system);
11837        __tmp.put_u8(self.log_levels);
11838        for val in &self.arguments {
11839            __tmp.put_u8(*val);
11840        }
11841        if matches!(version, MavlinkVersion::V2) {
11842            let len = __tmp.len();
11843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11844        } else {
11845            __tmp.len()
11846        }
11847    }
11848}
11849#[doc = "id: 245"]
11850#[doc = "Provides state for additional features."]
11851#[derive(Debug, Clone, PartialEq)]
11852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11853#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11854pub struct EXTENDED_SYS_STATE_DATA {
11855    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11856    pub vtol_state: MavVtolState,
11857    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11858    pub landed_state: MavLandedState,
11859}
11860impl EXTENDED_SYS_STATE_DATA {
11861    pub const ENCODED_LEN: usize = 2usize;
11862    pub const DEFAULT: Self = Self {
11863        vtol_state: MavVtolState::DEFAULT,
11864        landed_state: MavLandedState::DEFAULT,
11865    };
11866    #[cfg(feature = "arbitrary")]
11867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11868        use arbitrary::{Arbitrary, Unstructured};
11869        let mut buf = [0u8; 1024];
11870        rng.fill_bytes(&mut buf);
11871        let mut unstructured = Unstructured::new(&buf);
11872        Self::arbitrary(&mut unstructured).unwrap_or_default()
11873    }
11874}
11875impl Default for EXTENDED_SYS_STATE_DATA {
11876    fn default() -> Self {
11877        Self::DEFAULT.clone()
11878    }
11879}
11880impl MessageData for EXTENDED_SYS_STATE_DATA {
11881    type Message = MavMessage;
11882    const ID: u32 = 245u32;
11883    const NAME: &'static str = "EXTENDED_SYS_STATE";
11884    const EXTRA_CRC: u8 = 130u8;
11885    const ENCODED_LEN: usize = 2usize;
11886    fn deser(
11887        _version: MavlinkVersion,
11888        __input: &[u8],
11889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11890        let avail_len = __input.len();
11891        let mut payload_buf = [0; Self::ENCODED_LEN];
11892        let mut buf = if avail_len < Self::ENCODED_LEN {
11893            payload_buf[0..avail_len].copy_from_slice(__input);
11894            Bytes::new(&payload_buf)
11895        } else {
11896            Bytes::new(__input)
11897        };
11898        let mut __struct = Self::default();
11899        let tmp = buf.get_u8();
11900        __struct.vtol_state =
11901            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11902                enum_type: "MavVtolState",
11903                value: tmp as u32,
11904            })?;
11905        let tmp = buf.get_u8();
11906        __struct.landed_state =
11907            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11908                enum_type: "MavLandedState",
11909                value: tmp as u32,
11910            })?;
11911        Ok(__struct)
11912    }
11913    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11914        let mut __tmp = BytesMut::new(bytes);
11915        #[allow(clippy::absurd_extreme_comparisons)]
11916        #[allow(unused_comparisons)]
11917        if __tmp.remaining() < Self::ENCODED_LEN {
11918            panic!(
11919                "buffer is too small (need {} bytes, but got {})",
11920                Self::ENCODED_LEN,
11921                __tmp.remaining(),
11922            )
11923        }
11924        __tmp.put_u8(self.vtol_state as u8);
11925        __tmp.put_u8(self.landed_state as u8);
11926        if matches!(version, MavlinkVersion::V2) {
11927            let len = __tmp.len();
11928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11929        } else {
11930            __tmp.len()
11931        }
11932    }
11933}
11934#[doc = "id: 162"]
11935#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11936#[derive(Debug, Clone, PartialEq)]
11937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11939pub struct FENCE_STATUS_DATA {
11940    #[doc = "Time (since boot) of last breach."]
11941    pub breach_time: u32,
11942    #[doc = "Number of fence breaches."]
11943    pub breach_count: u16,
11944    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11945    pub breach_status: u8,
11946    #[doc = "Last breach type."]
11947    pub breach_type: FenceBreach,
11948    #[doc = "Active action to prevent fence breach"]
11949    #[cfg_attr(feature = "serde", serde(default))]
11950    pub breach_mitigation: FenceMitigate,
11951}
11952impl FENCE_STATUS_DATA {
11953    pub const ENCODED_LEN: usize = 9usize;
11954    pub const DEFAULT: Self = Self {
11955        breach_time: 0_u32,
11956        breach_count: 0_u16,
11957        breach_status: 0_u8,
11958        breach_type: FenceBreach::DEFAULT,
11959        breach_mitigation: FenceMitigate::DEFAULT,
11960    };
11961    #[cfg(feature = "arbitrary")]
11962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11963        use arbitrary::{Arbitrary, Unstructured};
11964        let mut buf = [0u8; 1024];
11965        rng.fill_bytes(&mut buf);
11966        let mut unstructured = Unstructured::new(&buf);
11967        Self::arbitrary(&mut unstructured).unwrap_or_default()
11968    }
11969}
11970impl Default for FENCE_STATUS_DATA {
11971    fn default() -> Self {
11972        Self::DEFAULT.clone()
11973    }
11974}
11975impl MessageData for FENCE_STATUS_DATA {
11976    type Message = MavMessage;
11977    const ID: u32 = 162u32;
11978    const NAME: &'static str = "FENCE_STATUS";
11979    const EXTRA_CRC: u8 = 189u8;
11980    const ENCODED_LEN: usize = 9usize;
11981    fn deser(
11982        _version: MavlinkVersion,
11983        __input: &[u8],
11984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11985        let avail_len = __input.len();
11986        let mut payload_buf = [0; Self::ENCODED_LEN];
11987        let mut buf = if avail_len < Self::ENCODED_LEN {
11988            payload_buf[0..avail_len].copy_from_slice(__input);
11989            Bytes::new(&payload_buf)
11990        } else {
11991            Bytes::new(__input)
11992        };
11993        let mut __struct = Self::default();
11994        __struct.breach_time = buf.get_u32_le();
11995        __struct.breach_count = buf.get_u16_le();
11996        __struct.breach_status = buf.get_u8();
11997        let tmp = buf.get_u8();
11998        __struct.breach_type =
11999            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12000                enum_type: "FenceBreach",
12001                value: tmp as u32,
12002            })?;
12003        let tmp = buf.get_u8();
12004        __struct.breach_mitigation =
12005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12006                enum_type: "FenceMitigate",
12007                value: tmp as u32,
12008            })?;
12009        Ok(__struct)
12010    }
12011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12012        let mut __tmp = BytesMut::new(bytes);
12013        #[allow(clippy::absurd_extreme_comparisons)]
12014        #[allow(unused_comparisons)]
12015        if __tmp.remaining() < Self::ENCODED_LEN {
12016            panic!(
12017                "buffer is too small (need {} bytes, but got {})",
12018                Self::ENCODED_LEN,
12019                __tmp.remaining(),
12020            )
12021        }
12022        __tmp.put_u32_le(self.breach_time);
12023        __tmp.put_u16_le(self.breach_count);
12024        __tmp.put_u8(self.breach_status);
12025        __tmp.put_u8(self.breach_type as u8);
12026        __tmp.put_u8(self.breach_mitigation as u8);
12027        if matches!(version, MavlinkVersion::V2) {
12028            let len = __tmp.len();
12029            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12030        } else {
12031            __tmp.len()
12032        }
12033    }
12034}
12035#[doc = "id: 110"]
12036#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12037#[derive(Debug, Clone, PartialEq)]
12038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12040pub struct FILE_TRANSFER_PROTOCOL_DATA {
12041    #[doc = "Network ID (0 for broadcast)"]
12042    pub target_network: u8,
12043    #[doc = "System ID (0 for broadcast)"]
12044    pub target_system: u8,
12045    #[doc = "Component ID (0 for broadcast)"]
12046    pub target_component: u8,
12047    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12049    pub payload: [u8; 251],
12050}
12051impl FILE_TRANSFER_PROTOCOL_DATA {
12052    pub const ENCODED_LEN: usize = 254usize;
12053    pub const DEFAULT: Self = Self {
12054        target_network: 0_u8,
12055        target_system: 0_u8,
12056        target_component: 0_u8,
12057        payload: [0_u8; 251usize],
12058    };
12059    #[cfg(feature = "arbitrary")]
12060    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12061        use arbitrary::{Arbitrary, Unstructured};
12062        let mut buf = [0u8; 1024];
12063        rng.fill_bytes(&mut buf);
12064        let mut unstructured = Unstructured::new(&buf);
12065        Self::arbitrary(&mut unstructured).unwrap_or_default()
12066    }
12067}
12068impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12069    fn default() -> Self {
12070        Self::DEFAULT.clone()
12071    }
12072}
12073impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12074    type Message = MavMessage;
12075    const ID: u32 = 110u32;
12076    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12077    const EXTRA_CRC: u8 = 84u8;
12078    const ENCODED_LEN: usize = 254usize;
12079    fn deser(
12080        _version: MavlinkVersion,
12081        __input: &[u8],
12082    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12083        let avail_len = __input.len();
12084        let mut payload_buf = [0; Self::ENCODED_LEN];
12085        let mut buf = if avail_len < Self::ENCODED_LEN {
12086            payload_buf[0..avail_len].copy_from_slice(__input);
12087            Bytes::new(&payload_buf)
12088        } else {
12089            Bytes::new(__input)
12090        };
12091        let mut __struct = Self::default();
12092        __struct.target_network = buf.get_u8();
12093        __struct.target_system = buf.get_u8();
12094        __struct.target_component = buf.get_u8();
12095        for v in &mut __struct.payload {
12096            let val = buf.get_u8();
12097            *v = val;
12098        }
12099        Ok(__struct)
12100    }
12101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12102        let mut __tmp = BytesMut::new(bytes);
12103        #[allow(clippy::absurd_extreme_comparisons)]
12104        #[allow(unused_comparisons)]
12105        if __tmp.remaining() < Self::ENCODED_LEN {
12106            panic!(
12107                "buffer is too small (need {} bytes, but got {})",
12108                Self::ENCODED_LEN,
12109                __tmp.remaining(),
12110            )
12111        }
12112        __tmp.put_u8(self.target_network);
12113        __tmp.put_u8(self.target_system);
12114        __tmp.put_u8(self.target_component);
12115        for val in &self.payload {
12116            __tmp.put_u8(*val);
12117        }
12118        if matches!(version, MavlinkVersion::V2) {
12119            let len = __tmp.len();
12120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12121        } else {
12122            __tmp.len()
12123        }
12124    }
12125}
12126#[doc = "id: 264"]
12127#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12128#[derive(Debug, Clone, PartialEq)]
12129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12131pub struct FLIGHT_INFORMATION_DATA {
12132    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12133    pub arming_time_utc: u64,
12134    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12135    pub takeoff_time_utc: u64,
12136    #[doc = "Flight number. Note, field is misnamed UUID."]
12137    pub flight_uuid: u64,
12138    #[doc = "Timestamp (time since system boot)."]
12139    pub time_boot_ms: u32,
12140    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12141    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12142    pub landing_time: u32,
12143}
12144impl FLIGHT_INFORMATION_DATA {
12145    pub const ENCODED_LEN: usize = 32usize;
12146    pub const DEFAULT: Self = Self {
12147        arming_time_utc: 0_u64,
12148        takeoff_time_utc: 0_u64,
12149        flight_uuid: 0_u64,
12150        time_boot_ms: 0_u32,
12151        landing_time: 0_u32,
12152    };
12153    #[cfg(feature = "arbitrary")]
12154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12155        use arbitrary::{Arbitrary, Unstructured};
12156        let mut buf = [0u8; 1024];
12157        rng.fill_bytes(&mut buf);
12158        let mut unstructured = Unstructured::new(&buf);
12159        Self::arbitrary(&mut unstructured).unwrap_or_default()
12160    }
12161}
12162impl Default for FLIGHT_INFORMATION_DATA {
12163    fn default() -> Self {
12164        Self::DEFAULT.clone()
12165    }
12166}
12167impl MessageData for FLIGHT_INFORMATION_DATA {
12168    type Message = MavMessage;
12169    const ID: u32 = 264u32;
12170    const NAME: &'static str = "FLIGHT_INFORMATION";
12171    const EXTRA_CRC: u8 = 49u8;
12172    const ENCODED_LEN: usize = 32usize;
12173    fn deser(
12174        _version: MavlinkVersion,
12175        __input: &[u8],
12176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12177        let avail_len = __input.len();
12178        let mut payload_buf = [0; Self::ENCODED_LEN];
12179        let mut buf = if avail_len < Self::ENCODED_LEN {
12180            payload_buf[0..avail_len].copy_from_slice(__input);
12181            Bytes::new(&payload_buf)
12182        } else {
12183            Bytes::new(__input)
12184        };
12185        let mut __struct = Self::default();
12186        __struct.arming_time_utc = buf.get_u64_le();
12187        __struct.takeoff_time_utc = buf.get_u64_le();
12188        __struct.flight_uuid = buf.get_u64_le();
12189        __struct.time_boot_ms = buf.get_u32_le();
12190        __struct.landing_time = buf.get_u32_le();
12191        Ok(__struct)
12192    }
12193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12194        let mut __tmp = BytesMut::new(bytes);
12195        #[allow(clippy::absurd_extreme_comparisons)]
12196        #[allow(unused_comparisons)]
12197        if __tmp.remaining() < Self::ENCODED_LEN {
12198            panic!(
12199                "buffer is too small (need {} bytes, but got {})",
12200                Self::ENCODED_LEN,
12201                __tmp.remaining(),
12202            )
12203        }
12204        __tmp.put_u64_le(self.arming_time_utc);
12205        __tmp.put_u64_le(self.takeoff_time_utc);
12206        __tmp.put_u64_le(self.flight_uuid);
12207        __tmp.put_u32_le(self.time_boot_ms);
12208        __tmp.put_u32_le(self.landing_time);
12209        if matches!(version, MavlinkVersion::V2) {
12210            let len = __tmp.len();
12211            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12212        } else {
12213            __tmp.len()
12214        }
12215    }
12216}
12217#[doc = "id: 144"]
12218#[doc = "Current motion information from a designated system."]
12219#[derive(Debug, Clone, PartialEq)]
12220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12222pub struct FOLLOW_TARGET_DATA {
12223    #[doc = "Timestamp (time since system boot)."]
12224    pub timestamp: u64,
12225    #[doc = "button states or switches of a tracker device"]
12226    pub custom_state: u64,
12227    #[doc = "Latitude (WGS84)"]
12228    pub lat: i32,
12229    #[doc = "Longitude (WGS84)"]
12230    pub lon: i32,
12231    #[doc = "Altitude (MSL)"]
12232    pub alt: f32,
12233    #[doc = "target velocity (0,0,0) for unknown"]
12234    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12235    pub vel: [f32; 3],
12236    #[doc = "linear target acceleration (0,0,0) for unknown"]
12237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12238    pub acc: [f32; 3],
12239    #[doc = "(0 0 0 0 for unknown)"]
12240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12241    pub attitude_q: [f32; 4],
12242    #[doc = "(0 0 0 for unknown)"]
12243    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12244    pub rates: [f32; 3],
12245    #[doc = "eph epv"]
12246    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12247    pub position_cov: [f32; 3],
12248    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12249    pub est_capabilities: u8,
12250}
12251impl FOLLOW_TARGET_DATA {
12252    pub const ENCODED_LEN: usize = 93usize;
12253    pub const DEFAULT: Self = Self {
12254        timestamp: 0_u64,
12255        custom_state: 0_u64,
12256        lat: 0_i32,
12257        lon: 0_i32,
12258        alt: 0.0_f32,
12259        vel: [0.0_f32; 3usize],
12260        acc: [0.0_f32; 3usize],
12261        attitude_q: [0.0_f32; 4usize],
12262        rates: [0.0_f32; 3usize],
12263        position_cov: [0.0_f32; 3usize],
12264        est_capabilities: 0_u8,
12265    };
12266    #[cfg(feature = "arbitrary")]
12267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12268        use arbitrary::{Arbitrary, Unstructured};
12269        let mut buf = [0u8; 1024];
12270        rng.fill_bytes(&mut buf);
12271        let mut unstructured = Unstructured::new(&buf);
12272        Self::arbitrary(&mut unstructured).unwrap_or_default()
12273    }
12274}
12275impl Default for FOLLOW_TARGET_DATA {
12276    fn default() -> Self {
12277        Self::DEFAULT.clone()
12278    }
12279}
12280impl MessageData for FOLLOW_TARGET_DATA {
12281    type Message = MavMessage;
12282    const ID: u32 = 144u32;
12283    const NAME: &'static str = "FOLLOW_TARGET";
12284    const EXTRA_CRC: u8 = 127u8;
12285    const ENCODED_LEN: usize = 93usize;
12286    fn deser(
12287        _version: MavlinkVersion,
12288        __input: &[u8],
12289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12290        let avail_len = __input.len();
12291        let mut payload_buf = [0; Self::ENCODED_LEN];
12292        let mut buf = if avail_len < Self::ENCODED_LEN {
12293            payload_buf[0..avail_len].copy_from_slice(__input);
12294            Bytes::new(&payload_buf)
12295        } else {
12296            Bytes::new(__input)
12297        };
12298        let mut __struct = Self::default();
12299        __struct.timestamp = buf.get_u64_le();
12300        __struct.custom_state = buf.get_u64_le();
12301        __struct.lat = buf.get_i32_le();
12302        __struct.lon = buf.get_i32_le();
12303        __struct.alt = buf.get_f32_le();
12304        for v in &mut __struct.vel {
12305            let val = buf.get_f32_le();
12306            *v = val;
12307        }
12308        for v in &mut __struct.acc {
12309            let val = buf.get_f32_le();
12310            *v = val;
12311        }
12312        for v in &mut __struct.attitude_q {
12313            let val = buf.get_f32_le();
12314            *v = val;
12315        }
12316        for v in &mut __struct.rates {
12317            let val = buf.get_f32_le();
12318            *v = val;
12319        }
12320        for v in &mut __struct.position_cov {
12321            let val = buf.get_f32_le();
12322            *v = val;
12323        }
12324        __struct.est_capabilities = buf.get_u8();
12325        Ok(__struct)
12326    }
12327    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12328        let mut __tmp = BytesMut::new(bytes);
12329        #[allow(clippy::absurd_extreme_comparisons)]
12330        #[allow(unused_comparisons)]
12331        if __tmp.remaining() < Self::ENCODED_LEN {
12332            panic!(
12333                "buffer is too small (need {} bytes, but got {})",
12334                Self::ENCODED_LEN,
12335                __tmp.remaining(),
12336            )
12337        }
12338        __tmp.put_u64_le(self.timestamp);
12339        __tmp.put_u64_le(self.custom_state);
12340        __tmp.put_i32_le(self.lat);
12341        __tmp.put_i32_le(self.lon);
12342        __tmp.put_f32_le(self.alt);
12343        for val in &self.vel {
12344            __tmp.put_f32_le(*val);
12345        }
12346        for val in &self.acc {
12347            __tmp.put_f32_le(*val);
12348        }
12349        for val in &self.attitude_q {
12350            __tmp.put_f32_le(*val);
12351        }
12352        for val in &self.rates {
12353            __tmp.put_f32_le(*val);
12354        }
12355        for val in &self.position_cov {
12356            __tmp.put_f32_le(*val);
12357        }
12358        __tmp.put_u8(self.est_capabilities);
12359        if matches!(version, MavlinkVersion::V2) {
12360            let len = __tmp.len();
12361            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12362        } else {
12363            __tmp.len()
12364        }
12365    }
12366}
12367#[doc = "id: 371"]
12368#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12369#[derive(Debug, Clone, PartialEq)]
12370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12372pub struct FUEL_STATUS_DATA {
12373    #[doc = "Capacity when full. Must be provided."]
12374    pub maximum_fuel: f32,
12375    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12376    pub consumed_fuel: f32,
12377    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12378    pub remaining_fuel: f32,
12379    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12380    pub flow_rate: f32,
12381    #[doc = "Fuel temperature. NaN: field not provided."]
12382    pub temperature: f32,
12383    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12384    pub fuel_type: MavFuelType,
12385    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12386    pub id: u8,
12387    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12388    pub percent_remaining: u8,
12389}
12390impl FUEL_STATUS_DATA {
12391    pub const ENCODED_LEN: usize = 26usize;
12392    pub const DEFAULT: Self = Self {
12393        maximum_fuel: 0.0_f32,
12394        consumed_fuel: 0.0_f32,
12395        remaining_fuel: 0.0_f32,
12396        flow_rate: 0.0_f32,
12397        temperature: 0.0_f32,
12398        fuel_type: MavFuelType::DEFAULT,
12399        id: 0_u8,
12400        percent_remaining: 0_u8,
12401    };
12402    #[cfg(feature = "arbitrary")]
12403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12404        use arbitrary::{Arbitrary, Unstructured};
12405        let mut buf = [0u8; 1024];
12406        rng.fill_bytes(&mut buf);
12407        let mut unstructured = Unstructured::new(&buf);
12408        Self::arbitrary(&mut unstructured).unwrap_or_default()
12409    }
12410}
12411impl Default for FUEL_STATUS_DATA {
12412    fn default() -> Self {
12413        Self::DEFAULT.clone()
12414    }
12415}
12416impl MessageData for FUEL_STATUS_DATA {
12417    type Message = MavMessage;
12418    const ID: u32 = 371u32;
12419    const NAME: &'static str = "FUEL_STATUS";
12420    const EXTRA_CRC: u8 = 10u8;
12421    const ENCODED_LEN: usize = 26usize;
12422    fn deser(
12423        _version: MavlinkVersion,
12424        __input: &[u8],
12425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12426        let avail_len = __input.len();
12427        let mut payload_buf = [0; Self::ENCODED_LEN];
12428        let mut buf = if avail_len < Self::ENCODED_LEN {
12429            payload_buf[0..avail_len].copy_from_slice(__input);
12430            Bytes::new(&payload_buf)
12431        } else {
12432            Bytes::new(__input)
12433        };
12434        let mut __struct = Self::default();
12435        __struct.maximum_fuel = buf.get_f32_le();
12436        __struct.consumed_fuel = buf.get_f32_le();
12437        __struct.remaining_fuel = buf.get_f32_le();
12438        __struct.flow_rate = buf.get_f32_le();
12439        __struct.temperature = buf.get_f32_le();
12440        let tmp = buf.get_u32_le();
12441        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12442            ::mavlink_core::error::ParserError::InvalidEnum {
12443                enum_type: "MavFuelType",
12444                value: tmp as u32,
12445            },
12446        )?;
12447        __struct.id = buf.get_u8();
12448        __struct.percent_remaining = buf.get_u8();
12449        Ok(__struct)
12450    }
12451    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12452        let mut __tmp = BytesMut::new(bytes);
12453        #[allow(clippy::absurd_extreme_comparisons)]
12454        #[allow(unused_comparisons)]
12455        if __tmp.remaining() < Self::ENCODED_LEN {
12456            panic!(
12457                "buffer is too small (need {} bytes, but got {})",
12458                Self::ENCODED_LEN,
12459                __tmp.remaining(),
12460            )
12461        }
12462        __tmp.put_f32_le(self.maximum_fuel);
12463        __tmp.put_f32_le(self.consumed_fuel);
12464        __tmp.put_f32_le(self.remaining_fuel);
12465        __tmp.put_f32_le(self.flow_rate);
12466        __tmp.put_f32_le(self.temperature);
12467        __tmp.put_u32_le(self.fuel_type as u32);
12468        __tmp.put_u8(self.id);
12469        __tmp.put_u8(self.percent_remaining);
12470        if matches!(version, MavlinkVersion::V2) {
12471            let len = __tmp.len();
12472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12473        } else {
12474            __tmp.len()
12475        }
12476    }
12477}
12478#[doc = "id: 373"]
12479#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12480#[derive(Debug, Clone, PartialEq)]
12481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12483pub struct GENERATOR_STATUS_DATA {
12484    #[doc = "Status flags."]
12485    pub status: MavGeneratorStatusFlag,
12486    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12487    pub battery_current: f32,
12488    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12489    pub load_current: f32,
12490    #[doc = "The power being generated. NaN: field not provided"]
12491    pub power_generated: f32,
12492    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12493    pub bus_voltage: f32,
12494    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12495    pub bat_current_setpoint: f32,
12496    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12497    pub runtime: u32,
12498    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12499    pub time_until_maintenance: i32,
12500    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12501    pub generator_speed: u16,
12502    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12503    pub rectifier_temperature: i16,
12504    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12505    pub generator_temperature: i16,
12506}
12507impl GENERATOR_STATUS_DATA {
12508    pub const ENCODED_LEN: usize = 42usize;
12509    pub const DEFAULT: Self = Self {
12510        status: MavGeneratorStatusFlag::DEFAULT,
12511        battery_current: 0.0_f32,
12512        load_current: 0.0_f32,
12513        power_generated: 0.0_f32,
12514        bus_voltage: 0.0_f32,
12515        bat_current_setpoint: 0.0_f32,
12516        runtime: 0_u32,
12517        time_until_maintenance: 0_i32,
12518        generator_speed: 0_u16,
12519        rectifier_temperature: 0_i16,
12520        generator_temperature: 0_i16,
12521    };
12522    #[cfg(feature = "arbitrary")]
12523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12524        use arbitrary::{Arbitrary, Unstructured};
12525        let mut buf = [0u8; 1024];
12526        rng.fill_bytes(&mut buf);
12527        let mut unstructured = Unstructured::new(&buf);
12528        Self::arbitrary(&mut unstructured).unwrap_or_default()
12529    }
12530}
12531impl Default for GENERATOR_STATUS_DATA {
12532    fn default() -> Self {
12533        Self::DEFAULT.clone()
12534    }
12535}
12536impl MessageData for GENERATOR_STATUS_DATA {
12537    type Message = MavMessage;
12538    const ID: u32 = 373u32;
12539    const NAME: &'static str = "GENERATOR_STATUS";
12540    const EXTRA_CRC: u8 = 117u8;
12541    const ENCODED_LEN: usize = 42usize;
12542    fn deser(
12543        _version: MavlinkVersion,
12544        __input: &[u8],
12545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12546        let avail_len = __input.len();
12547        let mut payload_buf = [0; Self::ENCODED_LEN];
12548        let mut buf = if avail_len < Self::ENCODED_LEN {
12549            payload_buf[0..avail_len].copy_from_slice(__input);
12550            Bytes::new(&payload_buf)
12551        } else {
12552            Bytes::new(__input)
12553        };
12554        let mut __struct = Self::default();
12555        let tmp = buf.get_u64_le();
12556        __struct.status = MavGeneratorStatusFlag::from_bits(
12557            tmp & MavGeneratorStatusFlag::all().bits(),
12558        )
12559        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12560            flag_type: "MavGeneratorStatusFlag",
12561            value: tmp as u32,
12562        })?;
12563        __struct.battery_current = buf.get_f32_le();
12564        __struct.load_current = buf.get_f32_le();
12565        __struct.power_generated = buf.get_f32_le();
12566        __struct.bus_voltage = buf.get_f32_le();
12567        __struct.bat_current_setpoint = buf.get_f32_le();
12568        __struct.runtime = buf.get_u32_le();
12569        __struct.time_until_maintenance = buf.get_i32_le();
12570        __struct.generator_speed = buf.get_u16_le();
12571        __struct.rectifier_temperature = buf.get_i16_le();
12572        __struct.generator_temperature = buf.get_i16_le();
12573        Ok(__struct)
12574    }
12575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12576        let mut __tmp = BytesMut::new(bytes);
12577        #[allow(clippy::absurd_extreme_comparisons)]
12578        #[allow(unused_comparisons)]
12579        if __tmp.remaining() < Self::ENCODED_LEN {
12580            panic!(
12581                "buffer is too small (need {} bytes, but got {})",
12582                Self::ENCODED_LEN,
12583                __tmp.remaining(),
12584            )
12585        }
12586        __tmp.put_u64_le(self.status.bits());
12587        __tmp.put_f32_le(self.battery_current);
12588        __tmp.put_f32_le(self.load_current);
12589        __tmp.put_f32_le(self.power_generated);
12590        __tmp.put_f32_le(self.bus_voltage);
12591        __tmp.put_f32_le(self.bat_current_setpoint);
12592        __tmp.put_u32_le(self.runtime);
12593        __tmp.put_i32_le(self.time_until_maintenance);
12594        __tmp.put_u16_le(self.generator_speed);
12595        __tmp.put_i16_le(self.rectifier_temperature);
12596        __tmp.put_i16_le(self.generator_temperature);
12597        if matches!(version, MavlinkVersion::V2) {
12598            let len = __tmp.len();
12599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12600        } else {
12601            __tmp.len()
12602        }
12603    }
12604}
12605#[doc = "id: 285"]
12606#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12607#[derive(Debug, Clone, PartialEq)]
12608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12609#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12610pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12611    #[doc = "Timestamp (time since system boot)."]
12612    pub time_boot_ms: u32,
12613    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12614    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12615    pub q: [f32; 4],
12616    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12617    pub angular_velocity_x: f32,
12618    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12619    pub angular_velocity_y: f32,
12620    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12621    pub angular_velocity_z: f32,
12622    #[doc = "Failure flags (0 for no failure)"]
12623    pub failure_flags: GimbalDeviceErrorFlags,
12624    #[doc = "Current gimbal flags set."]
12625    pub flags: GimbalDeviceFlags,
12626    #[doc = "System ID"]
12627    pub target_system: u8,
12628    #[doc = "Component ID"]
12629    pub target_component: u8,
12630    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12632    pub delta_yaw: f32,
12633    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12635    pub delta_yaw_velocity: f32,
12636    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12638    pub gimbal_device_id: u8,
12639}
12640impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12641    pub const ENCODED_LEN: usize = 49usize;
12642    pub const DEFAULT: Self = Self {
12643        time_boot_ms: 0_u32,
12644        q: [0.0_f32; 4usize],
12645        angular_velocity_x: 0.0_f32,
12646        angular_velocity_y: 0.0_f32,
12647        angular_velocity_z: 0.0_f32,
12648        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12649        flags: GimbalDeviceFlags::DEFAULT,
12650        target_system: 0_u8,
12651        target_component: 0_u8,
12652        delta_yaw: 0.0_f32,
12653        delta_yaw_velocity: 0.0_f32,
12654        gimbal_device_id: 0_u8,
12655    };
12656    #[cfg(feature = "arbitrary")]
12657    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12658        use arbitrary::{Arbitrary, Unstructured};
12659        let mut buf = [0u8; 1024];
12660        rng.fill_bytes(&mut buf);
12661        let mut unstructured = Unstructured::new(&buf);
12662        Self::arbitrary(&mut unstructured).unwrap_or_default()
12663    }
12664}
12665impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12666    fn default() -> Self {
12667        Self::DEFAULT.clone()
12668    }
12669}
12670impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12671    type Message = MavMessage;
12672    const ID: u32 = 285u32;
12673    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12674    const EXTRA_CRC: u8 = 137u8;
12675    const ENCODED_LEN: usize = 49usize;
12676    fn deser(
12677        _version: MavlinkVersion,
12678        __input: &[u8],
12679    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12680        let avail_len = __input.len();
12681        let mut payload_buf = [0; Self::ENCODED_LEN];
12682        let mut buf = if avail_len < Self::ENCODED_LEN {
12683            payload_buf[0..avail_len].copy_from_slice(__input);
12684            Bytes::new(&payload_buf)
12685        } else {
12686            Bytes::new(__input)
12687        };
12688        let mut __struct = Self::default();
12689        __struct.time_boot_ms = buf.get_u32_le();
12690        for v in &mut __struct.q {
12691            let val = buf.get_f32_le();
12692            *v = val;
12693        }
12694        __struct.angular_velocity_x = buf.get_f32_le();
12695        __struct.angular_velocity_y = buf.get_f32_le();
12696        __struct.angular_velocity_z = buf.get_f32_le();
12697        let tmp = buf.get_u32_le();
12698        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12699            tmp & GimbalDeviceErrorFlags::all().bits(),
12700        )
12701        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12702            flag_type: "GimbalDeviceErrorFlags",
12703            value: tmp as u32,
12704        })?;
12705        let tmp = buf.get_u16_le();
12706        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12707            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12708                flag_type: "GimbalDeviceFlags",
12709                value: tmp as u32,
12710            })?;
12711        __struct.target_system = buf.get_u8();
12712        __struct.target_component = buf.get_u8();
12713        __struct.delta_yaw = buf.get_f32_le();
12714        __struct.delta_yaw_velocity = buf.get_f32_le();
12715        __struct.gimbal_device_id = buf.get_u8();
12716        Ok(__struct)
12717    }
12718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12719        let mut __tmp = BytesMut::new(bytes);
12720        #[allow(clippy::absurd_extreme_comparisons)]
12721        #[allow(unused_comparisons)]
12722        if __tmp.remaining() < Self::ENCODED_LEN {
12723            panic!(
12724                "buffer is too small (need {} bytes, but got {})",
12725                Self::ENCODED_LEN,
12726                __tmp.remaining(),
12727            )
12728        }
12729        __tmp.put_u32_le(self.time_boot_ms);
12730        for val in &self.q {
12731            __tmp.put_f32_le(*val);
12732        }
12733        __tmp.put_f32_le(self.angular_velocity_x);
12734        __tmp.put_f32_le(self.angular_velocity_y);
12735        __tmp.put_f32_le(self.angular_velocity_z);
12736        __tmp.put_u32_le(self.failure_flags.bits());
12737        __tmp.put_u16_le(self.flags.bits());
12738        __tmp.put_u8(self.target_system);
12739        __tmp.put_u8(self.target_component);
12740        __tmp.put_f32_le(self.delta_yaw);
12741        __tmp.put_f32_le(self.delta_yaw_velocity);
12742        __tmp.put_u8(self.gimbal_device_id);
12743        if matches!(version, MavlinkVersion::V2) {
12744            let len = __tmp.len();
12745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12746        } else {
12747            __tmp.len()
12748        }
12749    }
12750}
12751#[doc = "id: 283"]
12752#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12753#[derive(Debug, Clone, PartialEq)]
12754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12756pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12757    #[doc = "UID of gimbal hardware (0 if unknown)."]
12758    pub uid: u64,
12759    #[doc = "Timestamp (time since system boot)."]
12760    pub time_boot_ms: u32,
12761    #[doc = "0xff)."]
12762    pub firmware_version: u32,
12763    #[doc = "0xff)."]
12764    pub hardware_version: u32,
12765    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12766    pub roll_min: f32,
12767    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12768    pub roll_max: f32,
12769    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12770    pub pitch_min: f32,
12771    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12772    pub pitch_max: f32,
12773    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12774    pub yaw_min: f32,
12775    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12776    pub yaw_max: f32,
12777    #[doc = "Bitmap of gimbal capability flags."]
12778    pub cap_flags: GimbalDeviceCapFlags,
12779    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12780    pub custom_cap_flags: u16,
12781    #[doc = "Name of the gimbal vendor."]
12782    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12783    pub vendor_name: [u8; 32],
12784    #[doc = "Name of the gimbal model."]
12785    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12786    pub model_name: [u8; 32],
12787    #[doc = "Custom name of the gimbal given to it by the user."]
12788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12789    pub custom_name: [u8; 32],
12790    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12791    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12792    pub gimbal_device_id: u8,
12793}
12794impl GIMBAL_DEVICE_INFORMATION_DATA {
12795    pub const ENCODED_LEN: usize = 145usize;
12796    pub const DEFAULT: Self = Self {
12797        uid: 0_u64,
12798        time_boot_ms: 0_u32,
12799        firmware_version: 0_u32,
12800        hardware_version: 0_u32,
12801        roll_min: 0.0_f32,
12802        roll_max: 0.0_f32,
12803        pitch_min: 0.0_f32,
12804        pitch_max: 0.0_f32,
12805        yaw_min: 0.0_f32,
12806        yaw_max: 0.0_f32,
12807        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12808        custom_cap_flags: 0_u16,
12809        vendor_name: [0_u8; 32usize],
12810        model_name: [0_u8; 32usize],
12811        custom_name: [0_u8; 32usize],
12812        gimbal_device_id: 0_u8,
12813    };
12814    #[cfg(feature = "arbitrary")]
12815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12816        use arbitrary::{Arbitrary, Unstructured};
12817        let mut buf = [0u8; 1024];
12818        rng.fill_bytes(&mut buf);
12819        let mut unstructured = Unstructured::new(&buf);
12820        Self::arbitrary(&mut unstructured).unwrap_or_default()
12821    }
12822}
12823impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12824    fn default() -> Self {
12825        Self::DEFAULT.clone()
12826    }
12827}
12828impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12829    type Message = MavMessage;
12830    const ID: u32 = 283u32;
12831    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12832    const EXTRA_CRC: u8 = 74u8;
12833    const ENCODED_LEN: usize = 145usize;
12834    fn deser(
12835        _version: MavlinkVersion,
12836        __input: &[u8],
12837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12838        let avail_len = __input.len();
12839        let mut payload_buf = [0; Self::ENCODED_LEN];
12840        let mut buf = if avail_len < Self::ENCODED_LEN {
12841            payload_buf[0..avail_len].copy_from_slice(__input);
12842            Bytes::new(&payload_buf)
12843        } else {
12844            Bytes::new(__input)
12845        };
12846        let mut __struct = Self::default();
12847        __struct.uid = buf.get_u64_le();
12848        __struct.time_boot_ms = buf.get_u32_le();
12849        __struct.firmware_version = buf.get_u32_le();
12850        __struct.hardware_version = buf.get_u32_le();
12851        __struct.roll_min = buf.get_f32_le();
12852        __struct.roll_max = buf.get_f32_le();
12853        __struct.pitch_min = buf.get_f32_le();
12854        __struct.pitch_max = buf.get_f32_le();
12855        __struct.yaw_min = buf.get_f32_le();
12856        __struct.yaw_max = buf.get_f32_le();
12857        let tmp = buf.get_u16_le();
12858        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12859            tmp & GimbalDeviceCapFlags::all().bits(),
12860        )
12861        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12862            flag_type: "GimbalDeviceCapFlags",
12863            value: tmp as u32,
12864        })?;
12865        __struct.custom_cap_flags = buf.get_u16_le();
12866        for v in &mut __struct.vendor_name {
12867            let val = buf.get_u8();
12868            *v = val;
12869        }
12870        for v in &mut __struct.model_name {
12871            let val = buf.get_u8();
12872            *v = val;
12873        }
12874        for v in &mut __struct.custom_name {
12875            let val = buf.get_u8();
12876            *v = val;
12877        }
12878        __struct.gimbal_device_id = buf.get_u8();
12879        Ok(__struct)
12880    }
12881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12882        let mut __tmp = BytesMut::new(bytes);
12883        #[allow(clippy::absurd_extreme_comparisons)]
12884        #[allow(unused_comparisons)]
12885        if __tmp.remaining() < Self::ENCODED_LEN {
12886            panic!(
12887                "buffer is too small (need {} bytes, but got {})",
12888                Self::ENCODED_LEN,
12889                __tmp.remaining(),
12890            )
12891        }
12892        __tmp.put_u64_le(self.uid);
12893        __tmp.put_u32_le(self.time_boot_ms);
12894        __tmp.put_u32_le(self.firmware_version);
12895        __tmp.put_u32_le(self.hardware_version);
12896        __tmp.put_f32_le(self.roll_min);
12897        __tmp.put_f32_le(self.roll_max);
12898        __tmp.put_f32_le(self.pitch_min);
12899        __tmp.put_f32_le(self.pitch_max);
12900        __tmp.put_f32_le(self.yaw_min);
12901        __tmp.put_f32_le(self.yaw_max);
12902        __tmp.put_u16_le(self.cap_flags.bits());
12903        __tmp.put_u16_le(self.custom_cap_flags);
12904        for val in &self.vendor_name {
12905            __tmp.put_u8(*val);
12906        }
12907        for val in &self.model_name {
12908            __tmp.put_u8(*val);
12909        }
12910        for val in &self.custom_name {
12911            __tmp.put_u8(*val);
12912        }
12913        __tmp.put_u8(self.gimbal_device_id);
12914        if matches!(version, MavlinkVersion::V2) {
12915            let len = __tmp.len();
12916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12917        } else {
12918            __tmp.len()
12919        }
12920    }
12921}
12922#[doc = "id: 284"]
12923#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12924#[derive(Debug, Clone, PartialEq)]
12925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12927pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12928    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12929    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12930    pub q: [f32; 4],
12931    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12932    pub angular_velocity_x: f32,
12933    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12934    pub angular_velocity_y: f32,
12935    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12936    pub angular_velocity_z: f32,
12937    #[doc = "Low level gimbal flags."]
12938    pub flags: GimbalDeviceFlags,
12939    #[doc = "System ID"]
12940    pub target_system: u8,
12941    #[doc = "Component ID"]
12942    pub target_component: u8,
12943}
12944impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12945    pub const ENCODED_LEN: usize = 32usize;
12946    pub const DEFAULT: Self = Self {
12947        q: [0.0_f32; 4usize],
12948        angular_velocity_x: 0.0_f32,
12949        angular_velocity_y: 0.0_f32,
12950        angular_velocity_z: 0.0_f32,
12951        flags: GimbalDeviceFlags::DEFAULT,
12952        target_system: 0_u8,
12953        target_component: 0_u8,
12954    };
12955    #[cfg(feature = "arbitrary")]
12956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12957        use arbitrary::{Arbitrary, Unstructured};
12958        let mut buf = [0u8; 1024];
12959        rng.fill_bytes(&mut buf);
12960        let mut unstructured = Unstructured::new(&buf);
12961        Self::arbitrary(&mut unstructured).unwrap_or_default()
12962    }
12963}
12964impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12965    fn default() -> Self {
12966        Self::DEFAULT.clone()
12967    }
12968}
12969impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12970    type Message = MavMessage;
12971    const ID: u32 = 284u32;
12972    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12973    const EXTRA_CRC: u8 = 99u8;
12974    const ENCODED_LEN: usize = 32usize;
12975    fn deser(
12976        _version: MavlinkVersion,
12977        __input: &[u8],
12978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12979        let avail_len = __input.len();
12980        let mut payload_buf = [0; Self::ENCODED_LEN];
12981        let mut buf = if avail_len < Self::ENCODED_LEN {
12982            payload_buf[0..avail_len].copy_from_slice(__input);
12983            Bytes::new(&payload_buf)
12984        } else {
12985            Bytes::new(__input)
12986        };
12987        let mut __struct = Self::default();
12988        for v in &mut __struct.q {
12989            let val = buf.get_f32_le();
12990            *v = val;
12991        }
12992        __struct.angular_velocity_x = buf.get_f32_le();
12993        __struct.angular_velocity_y = buf.get_f32_le();
12994        __struct.angular_velocity_z = buf.get_f32_le();
12995        let tmp = buf.get_u16_le();
12996        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12997            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12998                flag_type: "GimbalDeviceFlags",
12999                value: tmp as u32,
13000            })?;
13001        __struct.target_system = buf.get_u8();
13002        __struct.target_component = buf.get_u8();
13003        Ok(__struct)
13004    }
13005    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13006        let mut __tmp = BytesMut::new(bytes);
13007        #[allow(clippy::absurd_extreme_comparisons)]
13008        #[allow(unused_comparisons)]
13009        if __tmp.remaining() < Self::ENCODED_LEN {
13010            panic!(
13011                "buffer is too small (need {} bytes, but got {})",
13012                Self::ENCODED_LEN,
13013                __tmp.remaining(),
13014            )
13015        }
13016        for val in &self.q {
13017            __tmp.put_f32_le(*val);
13018        }
13019        __tmp.put_f32_le(self.angular_velocity_x);
13020        __tmp.put_f32_le(self.angular_velocity_y);
13021        __tmp.put_f32_le(self.angular_velocity_z);
13022        __tmp.put_u16_le(self.flags.bits());
13023        __tmp.put_u8(self.target_system);
13024        __tmp.put_u8(self.target_component);
13025        if matches!(version, MavlinkVersion::V2) {
13026            let len = __tmp.len();
13027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13028        } else {
13029            __tmp.len()
13030        }
13031    }
13032}
13033#[doc = "id: 280"]
13034#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13035#[derive(Debug, Clone, PartialEq)]
13036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13038pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13039    #[doc = "Timestamp (time since system boot)."]
13040    pub time_boot_ms: u32,
13041    #[doc = "Bitmap of gimbal capability flags."]
13042    pub cap_flags: GimbalManagerCapFlags,
13043    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13044    pub roll_min: f32,
13045    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13046    pub roll_max: f32,
13047    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13048    pub pitch_min: f32,
13049    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13050    pub pitch_max: f32,
13051    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13052    pub yaw_min: f32,
13053    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13054    pub yaw_max: f32,
13055    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13056    pub gimbal_device_id: u8,
13057}
13058impl GIMBAL_MANAGER_INFORMATION_DATA {
13059    pub const ENCODED_LEN: usize = 33usize;
13060    pub const DEFAULT: Self = Self {
13061        time_boot_ms: 0_u32,
13062        cap_flags: GimbalManagerCapFlags::DEFAULT,
13063        roll_min: 0.0_f32,
13064        roll_max: 0.0_f32,
13065        pitch_min: 0.0_f32,
13066        pitch_max: 0.0_f32,
13067        yaw_min: 0.0_f32,
13068        yaw_max: 0.0_f32,
13069        gimbal_device_id: 0_u8,
13070    };
13071    #[cfg(feature = "arbitrary")]
13072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13073        use arbitrary::{Arbitrary, Unstructured};
13074        let mut buf = [0u8; 1024];
13075        rng.fill_bytes(&mut buf);
13076        let mut unstructured = Unstructured::new(&buf);
13077        Self::arbitrary(&mut unstructured).unwrap_or_default()
13078    }
13079}
13080impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13081    fn default() -> Self {
13082        Self::DEFAULT.clone()
13083    }
13084}
13085impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13086    type Message = MavMessage;
13087    const ID: u32 = 280u32;
13088    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13089    const EXTRA_CRC: u8 = 70u8;
13090    const ENCODED_LEN: usize = 33usize;
13091    fn deser(
13092        _version: MavlinkVersion,
13093        __input: &[u8],
13094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13095        let avail_len = __input.len();
13096        let mut payload_buf = [0; Self::ENCODED_LEN];
13097        let mut buf = if avail_len < Self::ENCODED_LEN {
13098            payload_buf[0..avail_len].copy_from_slice(__input);
13099            Bytes::new(&payload_buf)
13100        } else {
13101            Bytes::new(__input)
13102        };
13103        let mut __struct = Self::default();
13104        __struct.time_boot_ms = buf.get_u32_le();
13105        let tmp = buf.get_u32_le();
13106        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13107            tmp & GimbalManagerCapFlags::all().bits(),
13108        )
13109        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13110            flag_type: "GimbalManagerCapFlags",
13111            value: tmp as u32,
13112        })?;
13113        __struct.roll_min = buf.get_f32_le();
13114        __struct.roll_max = buf.get_f32_le();
13115        __struct.pitch_min = buf.get_f32_le();
13116        __struct.pitch_max = buf.get_f32_le();
13117        __struct.yaw_min = buf.get_f32_le();
13118        __struct.yaw_max = buf.get_f32_le();
13119        __struct.gimbal_device_id = buf.get_u8();
13120        Ok(__struct)
13121    }
13122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13123        let mut __tmp = BytesMut::new(bytes);
13124        #[allow(clippy::absurd_extreme_comparisons)]
13125        #[allow(unused_comparisons)]
13126        if __tmp.remaining() < Self::ENCODED_LEN {
13127            panic!(
13128                "buffer is too small (need {} bytes, but got {})",
13129                Self::ENCODED_LEN,
13130                __tmp.remaining(),
13131            )
13132        }
13133        __tmp.put_u32_le(self.time_boot_ms);
13134        __tmp.put_u32_le(self.cap_flags.bits());
13135        __tmp.put_f32_le(self.roll_min);
13136        __tmp.put_f32_le(self.roll_max);
13137        __tmp.put_f32_le(self.pitch_min);
13138        __tmp.put_f32_le(self.pitch_max);
13139        __tmp.put_f32_le(self.yaw_min);
13140        __tmp.put_f32_le(self.yaw_max);
13141        __tmp.put_u8(self.gimbal_device_id);
13142        if matches!(version, MavlinkVersion::V2) {
13143            let len = __tmp.len();
13144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13145        } else {
13146            __tmp.len()
13147        }
13148    }
13149}
13150#[doc = "id: 282"]
13151#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13152#[derive(Debug, Clone, PartialEq)]
13153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13155pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13156    #[doc = "High level gimbal manager flags to use."]
13157    pub flags: GimbalManagerFlags,
13158    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13159    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13160    pub q: [f32; 4],
13161    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13162    pub angular_velocity_x: f32,
13163    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13164    pub angular_velocity_y: f32,
13165    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13166    pub angular_velocity_z: f32,
13167    #[doc = "System ID"]
13168    pub target_system: u8,
13169    #[doc = "Component ID"]
13170    pub target_component: u8,
13171    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13172    pub gimbal_device_id: u8,
13173}
13174impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13175    pub const ENCODED_LEN: usize = 35usize;
13176    pub const DEFAULT: Self = Self {
13177        flags: GimbalManagerFlags::DEFAULT,
13178        q: [0.0_f32; 4usize],
13179        angular_velocity_x: 0.0_f32,
13180        angular_velocity_y: 0.0_f32,
13181        angular_velocity_z: 0.0_f32,
13182        target_system: 0_u8,
13183        target_component: 0_u8,
13184        gimbal_device_id: 0_u8,
13185    };
13186    #[cfg(feature = "arbitrary")]
13187    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13188        use arbitrary::{Arbitrary, Unstructured};
13189        let mut buf = [0u8; 1024];
13190        rng.fill_bytes(&mut buf);
13191        let mut unstructured = Unstructured::new(&buf);
13192        Self::arbitrary(&mut unstructured).unwrap_or_default()
13193    }
13194}
13195impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13196    fn default() -> Self {
13197        Self::DEFAULT.clone()
13198    }
13199}
13200impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13201    type Message = MavMessage;
13202    const ID: u32 = 282u32;
13203    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13204    const EXTRA_CRC: u8 = 123u8;
13205    const ENCODED_LEN: usize = 35usize;
13206    fn deser(
13207        _version: MavlinkVersion,
13208        __input: &[u8],
13209    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13210        let avail_len = __input.len();
13211        let mut payload_buf = [0; Self::ENCODED_LEN];
13212        let mut buf = if avail_len < Self::ENCODED_LEN {
13213            payload_buf[0..avail_len].copy_from_slice(__input);
13214            Bytes::new(&payload_buf)
13215        } else {
13216            Bytes::new(__input)
13217        };
13218        let mut __struct = Self::default();
13219        let tmp = buf.get_u32_le();
13220        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13221            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13222                flag_type: "GimbalManagerFlags",
13223                value: tmp as u32,
13224            })?;
13225        for v in &mut __struct.q {
13226            let val = buf.get_f32_le();
13227            *v = val;
13228        }
13229        __struct.angular_velocity_x = buf.get_f32_le();
13230        __struct.angular_velocity_y = buf.get_f32_le();
13231        __struct.angular_velocity_z = buf.get_f32_le();
13232        __struct.target_system = buf.get_u8();
13233        __struct.target_component = buf.get_u8();
13234        __struct.gimbal_device_id = buf.get_u8();
13235        Ok(__struct)
13236    }
13237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13238        let mut __tmp = BytesMut::new(bytes);
13239        #[allow(clippy::absurd_extreme_comparisons)]
13240        #[allow(unused_comparisons)]
13241        if __tmp.remaining() < Self::ENCODED_LEN {
13242            panic!(
13243                "buffer is too small (need {} bytes, but got {})",
13244                Self::ENCODED_LEN,
13245                __tmp.remaining(),
13246            )
13247        }
13248        __tmp.put_u32_le(self.flags.bits());
13249        for val in &self.q {
13250            __tmp.put_f32_le(*val);
13251        }
13252        __tmp.put_f32_le(self.angular_velocity_x);
13253        __tmp.put_f32_le(self.angular_velocity_y);
13254        __tmp.put_f32_le(self.angular_velocity_z);
13255        __tmp.put_u8(self.target_system);
13256        __tmp.put_u8(self.target_component);
13257        __tmp.put_u8(self.gimbal_device_id);
13258        if matches!(version, MavlinkVersion::V2) {
13259            let len = __tmp.len();
13260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13261        } else {
13262            __tmp.len()
13263        }
13264    }
13265}
13266#[doc = "id: 288"]
13267#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13268#[derive(Debug, Clone, PartialEq)]
13269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13271pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13272    #[doc = "High level gimbal manager flags."]
13273    pub flags: GimbalManagerFlags,
13274    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13275    pub pitch: f32,
13276    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13277    pub yaw: f32,
13278    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13279    pub pitch_rate: f32,
13280    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13281    pub yaw_rate: f32,
13282    #[doc = "System ID"]
13283    pub target_system: u8,
13284    #[doc = "Component ID"]
13285    pub target_component: u8,
13286    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13287    pub gimbal_device_id: u8,
13288}
13289impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13290    pub const ENCODED_LEN: usize = 23usize;
13291    pub const DEFAULT: Self = Self {
13292        flags: GimbalManagerFlags::DEFAULT,
13293        pitch: 0.0_f32,
13294        yaw: 0.0_f32,
13295        pitch_rate: 0.0_f32,
13296        yaw_rate: 0.0_f32,
13297        target_system: 0_u8,
13298        target_component: 0_u8,
13299        gimbal_device_id: 0_u8,
13300    };
13301    #[cfg(feature = "arbitrary")]
13302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13303        use arbitrary::{Arbitrary, Unstructured};
13304        let mut buf = [0u8; 1024];
13305        rng.fill_bytes(&mut buf);
13306        let mut unstructured = Unstructured::new(&buf);
13307        Self::arbitrary(&mut unstructured).unwrap_or_default()
13308    }
13309}
13310impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13311    fn default() -> Self {
13312        Self::DEFAULT.clone()
13313    }
13314}
13315impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13316    type Message = MavMessage;
13317    const ID: u32 = 288u32;
13318    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13319    const EXTRA_CRC: u8 = 20u8;
13320    const ENCODED_LEN: usize = 23usize;
13321    fn deser(
13322        _version: MavlinkVersion,
13323        __input: &[u8],
13324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13325        let avail_len = __input.len();
13326        let mut payload_buf = [0; Self::ENCODED_LEN];
13327        let mut buf = if avail_len < Self::ENCODED_LEN {
13328            payload_buf[0..avail_len].copy_from_slice(__input);
13329            Bytes::new(&payload_buf)
13330        } else {
13331            Bytes::new(__input)
13332        };
13333        let mut __struct = Self::default();
13334        let tmp = buf.get_u32_le();
13335        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13336            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13337                flag_type: "GimbalManagerFlags",
13338                value: tmp as u32,
13339            })?;
13340        __struct.pitch = buf.get_f32_le();
13341        __struct.yaw = buf.get_f32_le();
13342        __struct.pitch_rate = buf.get_f32_le();
13343        __struct.yaw_rate = buf.get_f32_le();
13344        __struct.target_system = buf.get_u8();
13345        __struct.target_component = buf.get_u8();
13346        __struct.gimbal_device_id = buf.get_u8();
13347        Ok(__struct)
13348    }
13349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13350        let mut __tmp = BytesMut::new(bytes);
13351        #[allow(clippy::absurd_extreme_comparisons)]
13352        #[allow(unused_comparisons)]
13353        if __tmp.remaining() < Self::ENCODED_LEN {
13354            panic!(
13355                "buffer is too small (need {} bytes, but got {})",
13356                Self::ENCODED_LEN,
13357                __tmp.remaining(),
13358            )
13359        }
13360        __tmp.put_u32_le(self.flags.bits());
13361        __tmp.put_f32_le(self.pitch);
13362        __tmp.put_f32_le(self.yaw);
13363        __tmp.put_f32_le(self.pitch_rate);
13364        __tmp.put_f32_le(self.yaw_rate);
13365        __tmp.put_u8(self.target_system);
13366        __tmp.put_u8(self.target_component);
13367        __tmp.put_u8(self.gimbal_device_id);
13368        if matches!(version, MavlinkVersion::V2) {
13369            let len = __tmp.len();
13370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13371        } else {
13372            __tmp.len()
13373        }
13374    }
13375}
13376#[doc = "id: 287"]
13377#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13378#[derive(Debug, Clone, PartialEq)]
13379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13381pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13382    #[doc = "High level gimbal manager flags to use."]
13383    pub flags: GimbalManagerFlags,
13384    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13385    pub pitch: f32,
13386    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13387    pub yaw: f32,
13388    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13389    pub pitch_rate: f32,
13390    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13391    pub yaw_rate: f32,
13392    #[doc = "System ID"]
13393    pub target_system: u8,
13394    #[doc = "Component ID"]
13395    pub target_component: u8,
13396    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13397    pub gimbal_device_id: u8,
13398}
13399impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13400    pub const ENCODED_LEN: usize = 23usize;
13401    pub const DEFAULT: Self = Self {
13402        flags: GimbalManagerFlags::DEFAULT,
13403        pitch: 0.0_f32,
13404        yaw: 0.0_f32,
13405        pitch_rate: 0.0_f32,
13406        yaw_rate: 0.0_f32,
13407        target_system: 0_u8,
13408        target_component: 0_u8,
13409        gimbal_device_id: 0_u8,
13410    };
13411    #[cfg(feature = "arbitrary")]
13412    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13413        use arbitrary::{Arbitrary, Unstructured};
13414        let mut buf = [0u8; 1024];
13415        rng.fill_bytes(&mut buf);
13416        let mut unstructured = Unstructured::new(&buf);
13417        Self::arbitrary(&mut unstructured).unwrap_or_default()
13418    }
13419}
13420impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13421    fn default() -> Self {
13422        Self::DEFAULT.clone()
13423    }
13424}
13425impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13426    type Message = MavMessage;
13427    const ID: u32 = 287u32;
13428    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13429    const EXTRA_CRC: u8 = 1u8;
13430    const ENCODED_LEN: usize = 23usize;
13431    fn deser(
13432        _version: MavlinkVersion,
13433        __input: &[u8],
13434    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13435        let avail_len = __input.len();
13436        let mut payload_buf = [0; Self::ENCODED_LEN];
13437        let mut buf = if avail_len < Self::ENCODED_LEN {
13438            payload_buf[0..avail_len].copy_from_slice(__input);
13439            Bytes::new(&payload_buf)
13440        } else {
13441            Bytes::new(__input)
13442        };
13443        let mut __struct = Self::default();
13444        let tmp = buf.get_u32_le();
13445        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13446            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13447                flag_type: "GimbalManagerFlags",
13448                value: tmp as u32,
13449            })?;
13450        __struct.pitch = buf.get_f32_le();
13451        __struct.yaw = buf.get_f32_le();
13452        __struct.pitch_rate = buf.get_f32_le();
13453        __struct.yaw_rate = buf.get_f32_le();
13454        __struct.target_system = buf.get_u8();
13455        __struct.target_component = buf.get_u8();
13456        __struct.gimbal_device_id = buf.get_u8();
13457        Ok(__struct)
13458    }
13459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13460        let mut __tmp = BytesMut::new(bytes);
13461        #[allow(clippy::absurd_extreme_comparisons)]
13462        #[allow(unused_comparisons)]
13463        if __tmp.remaining() < Self::ENCODED_LEN {
13464            panic!(
13465                "buffer is too small (need {} bytes, but got {})",
13466                Self::ENCODED_LEN,
13467                __tmp.remaining(),
13468            )
13469        }
13470        __tmp.put_u32_le(self.flags.bits());
13471        __tmp.put_f32_le(self.pitch);
13472        __tmp.put_f32_le(self.yaw);
13473        __tmp.put_f32_le(self.pitch_rate);
13474        __tmp.put_f32_le(self.yaw_rate);
13475        __tmp.put_u8(self.target_system);
13476        __tmp.put_u8(self.target_component);
13477        __tmp.put_u8(self.gimbal_device_id);
13478        if matches!(version, MavlinkVersion::V2) {
13479            let len = __tmp.len();
13480            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13481        } else {
13482            __tmp.len()
13483        }
13484    }
13485}
13486#[doc = "id: 281"]
13487#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13488#[derive(Debug, Clone, PartialEq)]
13489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13490#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13491pub struct GIMBAL_MANAGER_STATUS_DATA {
13492    #[doc = "Timestamp (time since system boot)."]
13493    pub time_boot_ms: u32,
13494    #[doc = "High level gimbal manager flags currently applied."]
13495    pub flags: GimbalManagerFlags,
13496    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13497    pub gimbal_device_id: u8,
13498    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13499    pub primary_control_sysid: u8,
13500    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13501    pub primary_control_compid: u8,
13502    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13503    pub secondary_control_sysid: u8,
13504    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13505    pub secondary_control_compid: u8,
13506}
13507impl GIMBAL_MANAGER_STATUS_DATA {
13508    pub const ENCODED_LEN: usize = 13usize;
13509    pub const DEFAULT: Self = Self {
13510        time_boot_ms: 0_u32,
13511        flags: GimbalManagerFlags::DEFAULT,
13512        gimbal_device_id: 0_u8,
13513        primary_control_sysid: 0_u8,
13514        primary_control_compid: 0_u8,
13515        secondary_control_sysid: 0_u8,
13516        secondary_control_compid: 0_u8,
13517    };
13518    #[cfg(feature = "arbitrary")]
13519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13520        use arbitrary::{Arbitrary, Unstructured};
13521        let mut buf = [0u8; 1024];
13522        rng.fill_bytes(&mut buf);
13523        let mut unstructured = Unstructured::new(&buf);
13524        Self::arbitrary(&mut unstructured).unwrap_or_default()
13525    }
13526}
13527impl Default for GIMBAL_MANAGER_STATUS_DATA {
13528    fn default() -> Self {
13529        Self::DEFAULT.clone()
13530    }
13531}
13532impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13533    type Message = MavMessage;
13534    const ID: u32 = 281u32;
13535    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13536    const EXTRA_CRC: u8 = 48u8;
13537    const ENCODED_LEN: usize = 13usize;
13538    fn deser(
13539        _version: MavlinkVersion,
13540        __input: &[u8],
13541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13542        let avail_len = __input.len();
13543        let mut payload_buf = [0; Self::ENCODED_LEN];
13544        let mut buf = if avail_len < Self::ENCODED_LEN {
13545            payload_buf[0..avail_len].copy_from_slice(__input);
13546            Bytes::new(&payload_buf)
13547        } else {
13548            Bytes::new(__input)
13549        };
13550        let mut __struct = Self::default();
13551        __struct.time_boot_ms = buf.get_u32_le();
13552        let tmp = buf.get_u32_le();
13553        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13554            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13555                flag_type: "GimbalManagerFlags",
13556                value: tmp as u32,
13557            })?;
13558        __struct.gimbal_device_id = buf.get_u8();
13559        __struct.primary_control_sysid = buf.get_u8();
13560        __struct.primary_control_compid = buf.get_u8();
13561        __struct.secondary_control_sysid = buf.get_u8();
13562        __struct.secondary_control_compid = buf.get_u8();
13563        Ok(__struct)
13564    }
13565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13566        let mut __tmp = BytesMut::new(bytes);
13567        #[allow(clippy::absurd_extreme_comparisons)]
13568        #[allow(unused_comparisons)]
13569        if __tmp.remaining() < Self::ENCODED_LEN {
13570            panic!(
13571                "buffer is too small (need {} bytes, but got {})",
13572                Self::ENCODED_LEN,
13573                __tmp.remaining(),
13574            )
13575        }
13576        __tmp.put_u32_le(self.time_boot_ms);
13577        __tmp.put_u32_le(self.flags.bits());
13578        __tmp.put_u8(self.gimbal_device_id);
13579        __tmp.put_u8(self.primary_control_sysid);
13580        __tmp.put_u8(self.primary_control_compid);
13581        __tmp.put_u8(self.secondary_control_sysid);
13582        __tmp.put_u8(self.secondary_control_compid);
13583        if matches!(version, MavlinkVersion::V2) {
13584            let len = __tmp.len();
13585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13586        } else {
13587            __tmp.len()
13588        }
13589    }
13590}
13591#[doc = "id: 33"]
13592#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13593#[derive(Debug, Clone, PartialEq)]
13594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13596pub struct GLOBAL_POSITION_INT_DATA {
13597    #[doc = "Timestamp (time since system boot)."]
13598    pub time_boot_ms: u32,
13599    #[doc = "Latitude, expressed"]
13600    pub lat: i32,
13601    #[doc = "Longitude, expressed"]
13602    pub lon: i32,
13603    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13604    pub alt: i32,
13605    #[doc = "Altitude above home"]
13606    pub relative_alt: i32,
13607    #[doc = "Ground X Speed (Latitude, positive north)"]
13608    pub vx: i16,
13609    #[doc = "Ground Y Speed (Longitude, positive east)"]
13610    pub vy: i16,
13611    #[doc = "Ground Z Speed (Altitude, positive down)"]
13612    pub vz: i16,
13613    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13614    pub hdg: u16,
13615}
13616impl GLOBAL_POSITION_INT_DATA {
13617    pub const ENCODED_LEN: usize = 28usize;
13618    pub const DEFAULT: Self = Self {
13619        time_boot_ms: 0_u32,
13620        lat: 0_i32,
13621        lon: 0_i32,
13622        alt: 0_i32,
13623        relative_alt: 0_i32,
13624        vx: 0_i16,
13625        vy: 0_i16,
13626        vz: 0_i16,
13627        hdg: 0_u16,
13628    };
13629    #[cfg(feature = "arbitrary")]
13630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13631        use arbitrary::{Arbitrary, Unstructured};
13632        let mut buf = [0u8; 1024];
13633        rng.fill_bytes(&mut buf);
13634        let mut unstructured = Unstructured::new(&buf);
13635        Self::arbitrary(&mut unstructured).unwrap_or_default()
13636    }
13637}
13638impl Default for GLOBAL_POSITION_INT_DATA {
13639    fn default() -> Self {
13640        Self::DEFAULT.clone()
13641    }
13642}
13643impl MessageData for GLOBAL_POSITION_INT_DATA {
13644    type Message = MavMessage;
13645    const ID: u32 = 33u32;
13646    const NAME: &'static str = "GLOBAL_POSITION_INT";
13647    const EXTRA_CRC: u8 = 104u8;
13648    const ENCODED_LEN: usize = 28usize;
13649    fn deser(
13650        _version: MavlinkVersion,
13651        __input: &[u8],
13652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13653        let avail_len = __input.len();
13654        let mut payload_buf = [0; Self::ENCODED_LEN];
13655        let mut buf = if avail_len < Self::ENCODED_LEN {
13656            payload_buf[0..avail_len].copy_from_slice(__input);
13657            Bytes::new(&payload_buf)
13658        } else {
13659            Bytes::new(__input)
13660        };
13661        let mut __struct = Self::default();
13662        __struct.time_boot_ms = buf.get_u32_le();
13663        __struct.lat = buf.get_i32_le();
13664        __struct.lon = buf.get_i32_le();
13665        __struct.alt = buf.get_i32_le();
13666        __struct.relative_alt = buf.get_i32_le();
13667        __struct.vx = buf.get_i16_le();
13668        __struct.vy = buf.get_i16_le();
13669        __struct.vz = buf.get_i16_le();
13670        __struct.hdg = buf.get_u16_le();
13671        Ok(__struct)
13672    }
13673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13674        let mut __tmp = BytesMut::new(bytes);
13675        #[allow(clippy::absurd_extreme_comparisons)]
13676        #[allow(unused_comparisons)]
13677        if __tmp.remaining() < Self::ENCODED_LEN {
13678            panic!(
13679                "buffer is too small (need {} bytes, but got {})",
13680                Self::ENCODED_LEN,
13681                __tmp.remaining(),
13682            )
13683        }
13684        __tmp.put_u32_le(self.time_boot_ms);
13685        __tmp.put_i32_le(self.lat);
13686        __tmp.put_i32_le(self.lon);
13687        __tmp.put_i32_le(self.alt);
13688        __tmp.put_i32_le(self.relative_alt);
13689        __tmp.put_i16_le(self.vx);
13690        __tmp.put_i16_le(self.vy);
13691        __tmp.put_i16_le(self.vz);
13692        __tmp.put_u16_le(self.hdg);
13693        if matches!(version, MavlinkVersion::V2) {
13694            let len = __tmp.len();
13695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13696        } else {
13697            __tmp.len()
13698        }
13699    }
13700}
13701#[doc = "id: 63"]
13702#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13703#[derive(Debug, Clone, PartialEq)]
13704#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13705#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13706pub struct GLOBAL_POSITION_INT_COV_DATA {
13707    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13708    pub time_usec: u64,
13709    #[doc = "Latitude"]
13710    pub lat: i32,
13711    #[doc = "Longitude"]
13712    pub lon: i32,
13713    #[doc = "Altitude in meters above MSL"]
13714    pub alt: i32,
13715    #[doc = "Altitude above ground"]
13716    pub relative_alt: i32,
13717    #[doc = "Ground X Speed (Latitude)"]
13718    pub vx: f32,
13719    #[doc = "Ground Y Speed (Longitude)"]
13720    pub vy: f32,
13721    #[doc = "Ground Z Speed (Altitude)"]
13722    pub vz: f32,
13723    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13725    pub covariance: [f32; 36],
13726    #[doc = "Class id of the estimator this estimate originated from."]
13727    pub estimator_type: MavEstimatorType,
13728}
13729impl GLOBAL_POSITION_INT_COV_DATA {
13730    pub const ENCODED_LEN: usize = 181usize;
13731    pub const DEFAULT: Self = Self {
13732        time_usec: 0_u64,
13733        lat: 0_i32,
13734        lon: 0_i32,
13735        alt: 0_i32,
13736        relative_alt: 0_i32,
13737        vx: 0.0_f32,
13738        vy: 0.0_f32,
13739        vz: 0.0_f32,
13740        covariance: [0.0_f32; 36usize],
13741        estimator_type: MavEstimatorType::DEFAULT,
13742    };
13743    #[cfg(feature = "arbitrary")]
13744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13745        use arbitrary::{Arbitrary, Unstructured};
13746        let mut buf = [0u8; 1024];
13747        rng.fill_bytes(&mut buf);
13748        let mut unstructured = Unstructured::new(&buf);
13749        Self::arbitrary(&mut unstructured).unwrap_or_default()
13750    }
13751}
13752impl Default for GLOBAL_POSITION_INT_COV_DATA {
13753    fn default() -> Self {
13754        Self::DEFAULT.clone()
13755    }
13756}
13757impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13758    type Message = MavMessage;
13759    const ID: u32 = 63u32;
13760    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13761    const EXTRA_CRC: u8 = 119u8;
13762    const ENCODED_LEN: usize = 181usize;
13763    fn deser(
13764        _version: MavlinkVersion,
13765        __input: &[u8],
13766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13767        let avail_len = __input.len();
13768        let mut payload_buf = [0; Self::ENCODED_LEN];
13769        let mut buf = if avail_len < Self::ENCODED_LEN {
13770            payload_buf[0..avail_len].copy_from_slice(__input);
13771            Bytes::new(&payload_buf)
13772        } else {
13773            Bytes::new(__input)
13774        };
13775        let mut __struct = Self::default();
13776        __struct.time_usec = buf.get_u64_le();
13777        __struct.lat = buf.get_i32_le();
13778        __struct.lon = buf.get_i32_le();
13779        __struct.alt = buf.get_i32_le();
13780        __struct.relative_alt = buf.get_i32_le();
13781        __struct.vx = buf.get_f32_le();
13782        __struct.vy = buf.get_f32_le();
13783        __struct.vz = buf.get_f32_le();
13784        for v in &mut __struct.covariance {
13785            let val = buf.get_f32_le();
13786            *v = val;
13787        }
13788        let tmp = buf.get_u8();
13789        __struct.estimator_type =
13790            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13791                enum_type: "MavEstimatorType",
13792                value: tmp as u32,
13793            })?;
13794        Ok(__struct)
13795    }
13796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13797        let mut __tmp = BytesMut::new(bytes);
13798        #[allow(clippy::absurd_extreme_comparisons)]
13799        #[allow(unused_comparisons)]
13800        if __tmp.remaining() < Self::ENCODED_LEN {
13801            panic!(
13802                "buffer is too small (need {} bytes, but got {})",
13803                Self::ENCODED_LEN,
13804                __tmp.remaining(),
13805            )
13806        }
13807        __tmp.put_u64_le(self.time_usec);
13808        __tmp.put_i32_le(self.lat);
13809        __tmp.put_i32_le(self.lon);
13810        __tmp.put_i32_le(self.alt);
13811        __tmp.put_i32_le(self.relative_alt);
13812        __tmp.put_f32_le(self.vx);
13813        __tmp.put_f32_le(self.vy);
13814        __tmp.put_f32_le(self.vz);
13815        for val in &self.covariance {
13816            __tmp.put_f32_le(*val);
13817        }
13818        __tmp.put_u8(self.estimator_type as u8);
13819        if matches!(version, MavlinkVersion::V2) {
13820            let len = __tmp.len();
13821            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13822        } else {
13823            __tmp.len()
13824        }
13825    }
13826}
13827#[doc = "id: 101"]
13828#[doc = "Global position/attitude estimate from a vision source."]
13829#[derive(Debug, Clone, PartialEq)]
13830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13831#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13832pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13833    #[doc = "Timestamp (UNIX time or since system boot)"]
13834    pub usec: u64,
13835    #[doc = "Global X position"]
13836    pub x: f32,
13837    #[doc = "Global Y position"]
13838    pub y: f32,
13839    #[doc = "Global Z position"]
13840    pub z: f32,
13841    #[doc = "Roll angle"]
13842    pub roll: f32,
13843    #[doc = "Pitch angle"]
13844    pub pitch: f32,
13845    #[doc = "Yaw angle"]
13846    pub yaw: f32,
13847    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13850    pub covariance: [f32; 21],
13851    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13853    pub reset_counter: u8,
13854}
13855impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13856    pub const ENCODED_LEN: usize = 117usize;
13857    pub const DEFAULT: Self = Self {
13858        usec: 0_u64,
13859        x: 0.0_f32,
13860        y: 0.0_f32,
13861        z: 0.0_f32,
13862        roll: 0.0_f32,
13863        pitch: 0.0_f32,
13864        yaw: 0.0_f32,
13865        covariance: [0.0_f32; 21usize],
13866        reset_counter: 0_u8,
13867    };
13868    #[cfg(feature = "arbitrary")]
13869    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13870        use arbitrary::{Arbitrary, Unstructured};
13871        let mut buf = [0u8; 1024];
13872        rng.fill_bytes(&mut buf);
13873        let mut unstructured = Unstructured::new(&buf);
13874        Self::arbitrary(&mut unstructured).unwrap_or_default()
13875    }
13876}
13877impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13878    fn default() -> Self {
13879        Self::DEFAULT.clone()
13880    }
13881}
13882impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13883    type Message = MavMessage;
13884    const ID: u32 = 101u32;
13885    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13886    const EXTRA_CRC: u8 = 102u8;
13887    const ENCODED_LEN: usize = 117usize;
13888    fn deser(
13889        _version: MavlinkVersion,
13890        __input: &[u8],
13891    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13892        let avail_len = __input.len();
13893        let mut payload_buf = [0; Self::ENCODED_LEN];
13894        let mut buf = if avail_len < Self::ENCODED_LEN {
13895            payload_buf[0..avail_len].copy_from_slice(__input);
13896            Bytes::new(&payload_buf)
13897        } else {
13898            Bytes::new(__input)
13899        };
13900        let mut __struct = Self::default();
13901        __struct.usec = buf.get_u64_le();
13902        __struct.x = buf.get_f32_le();
13903        __struct.y = buf.get_f32_le();
13904        __struct.z = buf.get_f32_le();
13905        __struct.roll = buf.get_f32_le();
13906        __struct.pitch = buf.get_f32_le();
13907        __struct.yaw = buf.get_f32_le();
13908        for v in &mut __struct.covariance {
13909            let val = buf.get_f32_le();
13910            *v = val;
13911        }
13912        __struct.reset_counter = buf.get_u8();
13913        Ok(__struct)
13914    }
13915    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13916        let mut __tmp = BytesMut::new(bytes);
13917        #[allow(clippy::absurd_extreme_comparisons)]
13918        #[allow(unused_comparisons)]
13919        if __tmp.remaining() < Self::ENCODED_LEN {
13920            panic!(
13921                "buffer is too small (need {} bytes, but got {})",
13922                Self::ENCODED_LEN,
13923                __tmp.remaining(),
13924            )
13925        }
13926        __tmp.put_u64_le(self.usec);
13927        __tmp.put_f32_le(self.x);
13928        __tmp.put_f32_le(self.y);
13929        __tmp.put_f32_le(self.z);
13930        __tmp.put_f32_le(self.roll);
13931        __tmp.put_f32_le(self.pitch);
13932        __tmp.put_f32_le(self.yaw);
13933        for val in &self.covariance {
13934            __tmp.put_f32_le(*val);
13935        }
13936        __tmp.put_u8(self.reset_counter);
13937        if matches!(version, MavlinkVersion::V2) {
13938            let len = __tmp.len();
13939            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13940        } else {
13941            __tmp.len()
13942        }
13943    }
13944}
13945#[doc = "id: 124"]
13946#[doc = "Second GPS data."]
13947#[derive(Debug, Clone, PartialEq)]
13948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13950pub struct GPS2_RAW_DATA {
13951    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13952    pub time_usec: u64,
13953    #[doc = "Latitude (WGS84)"]
13954    pub lat: i32,
13955    #[doc = "Longitude (WGS84)"]
13956    pub lon: i32,
13957    #[doc = "Altitude (MSL). Positive for up."]
13958    pub alt: i32,
13959    #[doc = "Age of DGPS info"]
13960    pub dgps_age: u32,
13961    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13962    pub eph: u16,
13963    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13964    pub epv: u16,
13965    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13966    pub vel: u16,
13967    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13968    pub cog: u16,
13969    #[doc = "GPS fix type."]
13970    pub fix_type: GpsFixType,
13971    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13972    pub satellites_visible: u8,
13973    #[doc = "Number of DGPS satellites"]
13974    pub dgps_numch: u8,
13975    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13977    pub yaw: u16,
13978    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13980    pub alt_ellipsoid: i32,
13981    #[doc = "Position uncertainty."]
13982    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13983    pub h_acc: u32,
13984    #[doc = "Altitude uncertainty."]
13985    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13986    pub v_acc: u32,
13987    #[doc = "Speed uncertainty."]
13988    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13989    pub vel_acc: u32,
13990    #[doc = "Heading / track uncertainty"]
13991    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13992    pub hdg_acc: u32,
13993}
13994impl GPS2_RAW_DATA {
13995    pub const ENCODED_LEN: usize = 57usize;
13996    pub const DEFAULT: Self = Self {
13997        time_usec: 0_u64,
13998        lat: 0_i32,
13999        lon: 0_i32,
14000        alt: 0_i32,
14001        dgps_age: 0_u32,
14002        eph: 0_u16,
14003        epv: 0_u16,
14004        vel: 0_u16,
14005        cog: 0_u16,
14006        fix_type: GpsFixType::DEFAULT,
14007        satellites_visible: 0_u8,
14008        dgps_numch: 0_u8,
14009        yaw: 0_u16,
14010        alt_ellipsoid: 0_i32,
14011        h_acc: 0_u32,
14012        v_acc: 0_u32,
14013        vel_acc: 0_u32,
14014        hdg_acc: 0_u32,
14015    };
14016    #[cfg(feature = "arbitrary")]
14017    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14018        use arbitrary::{Arbitrary, Unstructured};
14019        let mut buf = [0u8; 1024];
14020        rng.fill_bytes(&mut buf);
14021        let mut unstructured = Unstructured::new(&buf);
14022        Self::arbitrary(&mut unstructured).unwrap_or_default()
14023    }
14024}
14025impl Default for GPS2_RAW_DATA {
14026    fn default() -> Self {
14027        Self::DEFAULT.clone()
14028    }
14029}
14030impl MessageData for GPS2_RAW_DATA {
14031    type Message = MavMessage;
14032    const ID: u32 = 124u32;
14033    const NAME: &'static str = "GPS2_RAW";
14034    const EXTRA_CRC: u8 = 87u8;
14035    const ENCODED_LEN: usize = 57usize;
14036    fn deser(
14037        _version: MavlinkVersion,
14038        __input: &[u8],
14039    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14040        let avail_len = __input.len();
14041        let mut payload_buf = [0; Self::ENCODED_LEN];
14042        let mut buf = if avail_len < Self::ENCODED_LEN {
14043            payload_buf[0..avail_len].copy_from_slice(__input);
14044            Bytes::new(&payload_buf)
14045        } else {
14046            Bytes::new(__input)
14047        };
14048        let mut __struct = Self::default();
14049        __struct.time_usec = buf.get_u64_le();
14050        __struct.lat = buf.get_i32_le();
14051        __struct.lon = buf.get_i32_le();
14052        __struct.alt = buf.get_i32_le();
14053        __struct.dgps_age = buf.get_u32_le();
14054        __struct.eph = buf.get_u16_le();
14055        __struct.epv = buf.get_u16_le();
14056        __struct.vel = buf.get_u16_le();
14057        __struct.cog = buf.get_u16_le();
14058        let tmp = buf.get_u8();
14059        __struct.fix_type =
14060            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14061                enum_type: "GpsFixType",
14062                value: tmp as u32,
14063            })?;
14064        __struct.satellites_visible = buf.get_u8();
14065        __struct.dgps_numch = buf.get_u8();
14066        __struct.yaw = buf.get_u16_le();
14067        __struct.alt_ellipsoid = buf.get_i32_le();
14068        __struct.h_acc = buf.get_u32_le();
14069        __struct.v_acc = buf.get_u32_le();
14070        __struct.vel_acc = buf.get_u32_le();
14071        __struct.hdg_acc = buf.get_u32_le();
14072        Ok(__struct)
14073    }
14074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14075        let mut __tmp = BytesMut::new(bytes);
14076        #[allow(clippy::absurd_extreme_comparisons)]
14077        #[allow(unused_comparisons)]
14078        if __tmp.remaining() < Self::ENCODED_LEN {
14079            panic!(
14080                "buffer is too small (need {} bytes, but got {})",
14081                Self::ENCODED_LEN,
14082                __tmp.remaining(),
14083            )
14084        }
14085        __tmp.put_u64_le(self.time_usec);
14086        __tmp.put_i32_le(self.lat);
14087        __tmp.put_i32_le(self.lon);
14088        __tmp.put_i32_le(self.alt);
14089        __tmp.put_u32_le(self.dgps_age);
14090        __tmp.put_u16_le(self.eph);
14091        __tmp.put_u16_le(self.epv);
14092        __tmp.put_u16_le(self.vel);
14093        __tmp.put_u16_le(self.cog);
14094        __tmp.put_u8(self.fix_type as u8);
14095        __tmp.put_u8(self.satellites_visible);
14096        __tmp.put_u8(self.dgps_numch);
14097        __tmp.put_u16_le(self.yaw);
14098        __tmp.put_i32_le(self.alt_ellipsoid);
14099        __tmp.put_u32_le(self.h_acc);
14100        __tmp.put_u32_le(self.v_acc);
14101        __tmp.put_u32_le(self.vel_acc);
14102        __tmp.put_u32_le(self.hdg_acc);
14103        if matches!(version, MavlinkVersion::V2) {
14104            let len = __tmp.len();
14105            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14106        } else {
14107            __tmp.len()
14108        }
14109    }
14110}
14111#[doc = "id: 128"]
14112#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14113#[derive(Debug, Clone, PartialEq)]
14114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14116pub struct GPS2_RTK_DATA {
14117    #[doc = "Time since boot of last baseline message received."]
14118    pub time_last_baseline_ms: u32,
14119    #[doc = "GPS Time of Week of last baseline"]
14120    pub tow: u32,
14121    #[doc = "Current baseline in ECEF x or NED north component."]
14122    pub baseline_a_mm: i32,
14123    #[doc = "Current baseline in ECEF y or NED east component."]
14124    pub baseline_b_mm: i32,
14125    #[doc = "Current baseline in ECEF z or NED down component."]
14126    pub baseline_c_mm: i32,
14127    #[doc = "Current estimate of baseline accuracy."]
14128    pub accuracy: u32,
14129    #[doc = "Current number of integer ambiguity hypotheses."]
14130    pub iar_num_hypotheses: i32,
14131    #[doc = "GPS Week Number of last baseline"]
14132    pub wn: u16,
14133    #[doc = "Identification of connected RTK receiver."]
14134    pub rtk_receiver_id: u8,
14135    #[doc = "GPS-specific health report for RTK data."]
14136    pub rtk_health: u8,
14137    #[doc = "Rate of baseline messages being received by GPS"]
14138    pub rtk_rate: u8,
14139    #[doc = "Current number of sats used for RTK calculation."]
14140    pub nsats: u8,
14141    #[doc = "Coordinate system of baseline"]
14142    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14143}
14144impl GPS2_RTK_DATA {
14145    pub const ENCODED_LEN: usize = 35usize;
14146    pub const DEFAULT: Self = Self {
14147        time_last_baseline_ms: 0_u32,
14148        tow: 0_u32,
14149        baseline_a_mm: 0_i32,
14150        baseline_b_mm: 0_i32,
14151        baseline_c_mm: 0_i32,
14152        accuracy: 0_u32,
14153        iar_num_hypotheses: 0_i32,
14154        wn: 0_u16,
14155        rtk_receiver_id: 0_u8,
14156        rtk_health: 0_u8,
14157        rtk_rate: 0_u8,
14158        nsats: 0_u8,
14159        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14160    };
14161    #[cfg(feature = "arbitrary")]
14162    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14163        use arbitrary::{Arbitrary, Unstructured};
14164        let mut buf = [0u8; 1024];
14165        rng.fill_bytes(&mut buf);
14166        let mut unstructured = Unstructured::new(&buf);
14167        Self::arbitrary(&mut unstructured).unwrap_or_default()
14168    }
14169}
14170impl Default for GPS2_RTK_DATA {
14171    fn default() -> Self {
14172        Self::DEFAULT.clone()
14173    }
14174}
14175impl MessageData for GPS2_RTK_DATA {
14176    type Message = MavMessage;
14177    const ID: u32 = 128u32;
14178    const NAME: &'static str = "GPS2_RTK";
14179    const EXTRA_CRC: u8 = 226u8;
14180    const ENCODED_LEN: usize = 35usize;
14181    fn deser(
14182        _version: MavlinkVersion,
14183        __input: &[u8],
14184    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14185        let avail_len = __input.len();
14186        let mut payload_buf = [0; Self::ENCODED_LEN];
14187        let mut buf = if avail_len < Self::ENCODED_LEN {
14188            payload_buf[0..avail_len].copy_from_slice(__input);
14189            Bytes::new(&payload_buf)
14190        } else {
14191            Bytes::new(__input)
14192        };
14193        let mut __struct = Self::default();
14194        __struct.time_last_baseline_ms = buf.get_u32_le();
14195        __struct.tow = buf.get_u32_le();
14196        __struct.baseline_a_mm = buf.get_i32_le();
14197        __struct.baseline_b_mm = buf.get_i32_le();
14198        __struct.baseline_c_mm = buf.get_i32_le();
14199        __struct.accuracy = buf.get_u32_le();
14200        __struct.iar_num_hypotheses = buf.get_i32_le();
14201        __struct.wn = buf.get_u16_le();
14202        __struct.rtk_receiver_id = buf.get_u8();
14203        __struct.rtk_health = buf.get_u8();
14204        __struct.rtk_rate = buf.get_u8();
14205        __struct.nsats = buf.get_u8();
14206        let tmp = buf.get_u8();
14207        __struct.baseline_coords_type =
14208            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14209                enum_type: "RtkBaselineCoordinateSystem",
14210                value: tmp as u32,
14211            })?;
14212        Ok(__struct)
14213    }
14214    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14215        let mut __tmp = BytesMut::new(bytes);
14216        #[allow(clippy::absurd_extreme_comparisons)]
14217        #[allow(unused_comparisons)]
14218        if __tmp.remaining() < Self::ENCODED_LEN {
14219            panic!(
14220                "buffer is too small (need {} bytes, but got {})",
14221                Self::ENCODED_LEN,
14222                __tmp.remaining(),
14223            )
14224        }
14225        __tmp.put_u32_le(self.time_last_baseline_ms);
14226        __tmp.put_u32_le(self.tow);
14227        __tmp.put_i32_le(self.baseline_a_mm);
14228        __tmp.put_i32_le(self.baseline_b_mm);
14229        __tmp.put_i32_le(self.baseline_c_mm);
14230        __tmp.put_u32_le(self.accuracy);
14231        __tmp.put_i32_le(self.iar_num_hypotheses);
14232        __tmp.put_u16_le(self.wn);
14233        __tmp.put_u8(self.rtk_receiver_id);
14234        __tmp.put_u8(self.rtk_health);
14235        __tmp.put_u8(self.rtk_rate);
14236        __tmp.put_u8(self.nsats);
14237        __tmp.put_u8(self.baseline_coords_type as u8);
14238        if matches!(version, MavlinkVersion::V2) {
14239            let len = __tmp.len();
14240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14241        } else {
14242            __tmp.len()
14243        }
14244    }
14245}
14246#[doc = "id: 49"]
14247#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14248#[derive(Debug, Clone, PartialEq)]
14249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14251pub struct GPS_GLOBAL_ORIGIN_DATA {
14252    #[doc = "Latitude (WGS84)"]
14253    pub latitude: i32,
14254    #[doc = "Longitude (WGS84)"]
14255    pub longitude: i32,
14256    #[doc = "Altitude (MSL). Positive for up."]
14257    pub altitude: i32,
14258    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14259    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14260    pub time_usec: u64,
14261}
14262impl GPS_GLOBAL_ORIGIN_DATA {
14263    pub const ENCODED_LEN: usize = 20usize;
14264    pub const DEFAULT: Self = Self {
14265        latitude: 0_i32,
14266        longitude: 0_i32,
14267        altitude: 0_i32,
14268        time_usec: 0_u64,
14269    };
14270    #[cfg(feature = "arbitrary")]
14271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14272        use arbitrary::{Arbitrary, Unstructured};
14273        let mut buf = [0u8; 1024];
14274        rng.fill_bytes(&mut buf);
14275        let mut unstructured = Unstructured::new(&buf);
14276        Self::arbitrary(&mut unstructured).unwrap_or_default()
14277    }
14278}
14279impl Default for GPS_GLOBAL_ORIGIN_DATA {
14280    fn default() -> Self {
14281        Self::DEFAULT.clone()
14282    }
14283}
14284impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14285    type Message = MavMessage;
14286    const ID: u32 = 49u32;
14287    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14288    const EXTRA_CRC: u8 = 39u8;
14289    const ENCODED_LEN: usize = 20usize;
14290    fn deser(
14291        _version: MavlinkVersion,
14292        __input: &[u8],
14293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14294        let avail_len = __input.len();
14295        let mut payload_buf = [0; Self::ENCODED_LEN];
14296        let mut buf = if avail_len < Self::ENCODED_LEN {
14297            payload_buf[0..avail_len].copy_from_slice(__input);
14298            Bytes::new(&payload_buf)
14299        } else {
14300            Bytes::new(__input)
14301        };
14302        let mut __struct = Self::default();
14303        __struct.latitude = buf.get_i32_le();
14304        __struct.longitude = buf.get_i32_le();
14305        __struct.altitude = buf.get_i32_le();
14306        __struct.time_usec = buf.get_u64_le();
14307        Ok(__struct)
14308    }
14309    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14310        let mut __tmp = BytesMut::new(bytes);
14311        #[allow(clippy::absurd_extreme_comparisons)]
14312        #[allow(unused_comparisons)]
14313        if __tmp.remaining() < Self::ENCODED_LEN {
14314            panic!(
14315                "buffer is too small (need {} bytes, but got {})",
14316                Self::ENCODED_LEN,
14317                __tmp.remaining(),
14318            )
14319        }
14320        __tmp.put_i32_le(self.latitude);
14321        __tmp.put_i32_le(self.longitude);
14322        __tmp.put_i32_le(self.altitude);
14323        __tmp.put_u64_le(self.time_usec);
14324        if matches!(version, MavlinkVersion::V2) {
14325            let len = __tmp.len();
14326            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14327        } else {
14328            __tmp.len()
14329        }
14330    }
14331}
14332#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14333#[doc = "id: 123"]
14334#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14335#[derive(Debug, Clone, PartialEq)]
14336#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14337#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14338pub struct GPS_INJECT_DATA_DATA {
14339    #[doc = "System ID"]
14340    pub target_system: u8,
14341    #[doc = "Component ID"]
14342    pub target_component: u8,
14343    #[doc = "Data length"]
14344    pub len: u8,
14345    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14347    pub data: [u8; 110],
14348}
14349impl GPS_INJECT_DATA_DATA {
14350    pub const ENCODED_LEN: usize = 113usize;
14351    pub const DEFAULT: Self = Self {
14352        target_system: 0_u8,
14353        target_component: 0_u8,
14354        len: 0_u8,
14355        data: [0_u8; 110usize],
14356    };
14357    #[cfg(feature = "arbitrary")]
14358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14359        use arbitrary::{Arbitrary, Unstructured};
14360        let mut buf = [0u8; 1024];
14361        rng.fill_bytes(&mut buf);
14362        let mut unstructured = Unstructured::new(&buf);
14363        Self::arbitrary(&mut unstructured).unwrap_or_default()
14364    }
14365}
14366impl Default for GPS_INJECT_DATA_DATA {
14367    fn default() -> Self {
14368        Self::DEFAULT.clone()
14369    }
14370}
14371impl MessageData for GPS_INJECT_DATA_DATA {
14372    type Message = MavMessage;
14373    const ID: u32 = 123u32;
14374    const NAME: &'static str = "GPS_INJECT_DATA";
14375    const EXTRA_CRC: u8 = 250u8;
14376    const ENCODED_LEN: usize = 113usize;
14377    fn deser(
14378        _version: MavlinkVersion,
14379        __input: &[u8],
14380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14381        let avail_len = __input.len();
14382        let mut payload_buf = [0; Self::ENCODED_LEN];
14383        let mut buf = if avail_len < Self::ENCODED_LEN {
14384            payload_buf[0..avail_len].copy_from_slice(__input);
14385            Bytes::new(&payload_buf)
14386        } else {
14387            Bytes::new(__input)
14388        };
14389        let mut __struct = Self::default();
14390        __struct.target_system = buf.get_u8();
14391        __struct.target_component = buf.get_u8();
14392        __struct.len = buf.get_u8();
14393        for v in &mut __struct.data {
14394            let val = buf.get_u8();
14395            *v = val;
14396        }
14397        Ok(__struct)
14398    }
14399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14400        let mut __tmp = BytesMut::new(bytes);
14401        #[allow(clippy::absurd_extreme_comparisons)]
14402        #[allow(unused_comparisons)]
14403        if __tmp.remaining() < Self::ENCODED_LEN {
14404            panic!(
14405                "buffer is too small (need {} bytes, but got {})",
14406                Self::ENCODED_LEN,
14407                __tmp.remaining(),
14408            )
14409        }
14410        __tmp.put_u8(self.target_system);
14411        __tmp.put_u8(self.target_component);
14412        __tmp.put_u8(self.len);
14413        for val in &self.data {
14414            __tmp.put_u8(*val);
14415        }
14416        if matches!(version, MavlinkVersion::V2) {
14417            let len = __tmp.len();
14418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14419        } else {
14420            __tmp.len()
14421        }
14422    }
14423}
14424#[doc = "id: 232"]
14425#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14426#[derive(Debug, Clone, PartialEq)]
14427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14429pub struct GPS_INPUT_DATA {
14430    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14431    pub time_usec: u64,
14432    #[doc = "GPS time (from start of GPS week)"]
14433    pub time_week_ms: u32,
14434    #[doc = "Latitude (WGS84)"]
14435    pub lat: i32,
14436    #[doc = "Longitude (WGS84)"]
14437    pub lon: i32,
14438    #[doc = "Altitude (MSL). Positive for up."]
14439    pub alt: f32,
14440    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14441    pub hdop: f32,
14442    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14443    pub vdop: f32,
14444    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14445    pub vn: f32,
14446    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14447    pub ve: f32,
14448    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14449    pub vd: f32,
14450    #[doc = "GPS speed accuracy"]
14451    pub speed_accuracy: f32,
14452    #[doc = "GPS horizontal accuracy"]
14453    pub horiz_accuracy: f32,
14454    #[doc = "GPS vertical accuracy"]
14455    pub vert_accuracy: f32,
14456    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14457    pub ignore_flags: GpsInputIgnoreFlags,
14458    #[doc = "GPS week number"]
14459    pub time_week: u16,
14460    #[doc = "ID of the GPS for multiple GPS inputs"]
14461    pub gps_id: u8,
14462    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14463    pub fix_type: u8,
14464    #[doc = "Number of satellites visible."]
14465    pub satellites_visible: u8,
14466    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14467    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14468    pub yaw: u16,
14469}
14470impl GPS_INPUT_DATA {
14471    pub const ENCODED_LEN: usize = 65usize;
14472    pub const DEFAULT: Self = Self {
14473        time_usec: 0_u64,
14474        time_week_ms: 0_u32,
14475        lat: 0_i32,
14476        lon: 0_i32,
14477        alt: 0.0_f32,
14478        hdop: 0.0_f32,
14479        vdop: 0.0_f32,
14480        vn: 0.0_f32,
14481        ve: 0.0_f32,
14482        vd: 0.0_f32,
14483        speed_accuracy: 0.0_f32,
14484        horiz_accuracy: 0.0_f32,
14485        vert_accuracy: 0.0_f32,
14486        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14487        time_week: 0_u16,
14488        gps_id: 0_u8,
14489        fix_type: 0_u8,
14490        satellites_visible: 0_u8,
14491        yaw: 0_u16,
14492    };
14493    #[cfg(feature = "arbitrary")]
14494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14495        use arbitrary::{Arbitrary, Unstructured};
14496        let mut buf = [0u8; 1024];
14497        rng.fill_bytes(&mut buf);
14498        let mut unstructured = Unstructured::new(&buf);
14499        Self::arbitrary(&mut unstructured).unwrap_or_default()
14500    }
14501}
14502impl Default for GPS_INPUT_DATA {
14503    fn default() -> Self {
14504        Self::DEFAULT.clone()
14505    }
14506}
14507impl MessageData for GPS_INPUT_DATA {
14508    type Message = MavMessage;
14509    const ID: u32 = 232u32;
14510    const NAME: &'static str = "GPS_INPUT";
14511    const EXTRA_CRC: u8 = 151u8;
14512    const ENCODED_LEN: usize = 65usize;
14513    fn deser(
14514        _version: MavlinkVersion,
14515        __input: &[u8],
14516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14517        let avail_len = __input.len();
14518        let mut payload_buf = [0; Self::ENCODED_LEN];
14519        let mut buf = if avail_len < Self::ENCODED_LEN {
14520            payload_buf[0..avail_len].copy_from_slice(__input);
14521            Bytes::new(&payload_buf)
14522        } else {
14523            Bytes::new(__input)
14524        };
14525        let mut __struct = Self::default();
14526        __struct.time_usec = buf.get_u64_le();
14527        __struct.time_week_ms = buf.get_u32_le();
14528        __struct.lat = buf.get_i32_le();
14529        __struct.lon = buf.get_i32_le();
14530        __struct.alt = buf.get_f32_le();
14531        __struct.hdop = buf.get_f32_le();
14532        __struct.vdop = buf.get_f32_le();
14533        __struct.vn = buf.get_f32_le();
14534        __struct.ve = buf.get_f32_le();
14535        __struct.vd = buf.get_f32_le();
14536        __struct.speed_accuracy = buf.get_f32_le();
14537        __struct.horiz_accuracy = buf.get_f32_le();
14538        __struct.vert_accuracy = buf.get_f32_le();
14539        let tmp = buf.get_u16_le();
14540        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14541            tmp & GpsInputIgnoreFlags::all().bits(),
14542        )
14543        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14544            flag_type: "GpsInputIgnoreFlags",
14545            value: tmp as u32,
14546        })?;
14547        __struct.time_week = buf.get_u16_le();
14548        __struct.gps_id = buf.get_u8();
14549        __struct.fix_type = buf.get_u8();
14550        __struct.satellites_visible = buf.get_u8();
14551        __struct.yaw = buf.get_u16_le();
14552        Ok(__struct)
14553    }
14554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14555        let mut __tmp = BytesMut::new(bytes);
14556        #[allow(clippy::absurd_extreme_comparisons)]
14557        #[allow(unused_comparisons)]
14558        if __tmp.remaining() < Self::ENCODED_LEN {
14559            panic!(
14560                "buffer is too small (need {} bytes, but got {})",
14561                Self::ENCODED_LEN,
14562                __tmp.remaining(),
14563            )
14564        }
14565        __tmp.put_u64_le(self.time_usec);
14566        __tmp.put_u32_le(self.time_week_ms);
14567        __tmp.put_i32_le(self.lat);
14568        __tmp.put_i32_le(self.lon);
14569        __tmp.put_f32_le(self.alt);
14570        __tmp.put_f32_le(self.hdop);
14571        __tmp.put_f32_le(self.vdop);
14572        __tmp.put_f32_le(self.vn);
14573        __tmp.put_f32_le(self.ve);
14574        __tmp.put_f32_le(self.vd);
14575        __tmp.put_f32_le(self.speed_accuracy);
14576        __tmp.put_f32_le(self.horiz_accuracy);
14577        __tmp.put_f32_le(self.vert_accuracy);
14578        __tmp.put_u16_le(self.ignore_flags.bits());
14579        __tmp.put_u16_le(self.time_week);
14580        __tmp.put_u8(self.gps_id);
14581        __tmp.put_u8(self.fix_type);
14582        __tmp.put_u8(self.satellites_visible);
14583        __tmp.put_u16_le(self.yaw);
14584        if matches!(version, MavlinkVersion::V2) {
14585            let len = __tmp.len();
14586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14587        } else {
14588            __tmp.len()
14589        }
14590    }
14591}
14592#[doc = "id: 24"]
14593#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14594#[derive(Debug, Clone, PartialEq)]
14595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14597pub struct GPS_RAW_INT_DATA {
14598    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14599    pub time_usec: u64,
14600    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14601    pub lat: i32,
14602    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14603    pub lon: i32,
14604    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14605    pub alt: i32,
14606    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14607    pub eph: u16,
14608    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14609    pub epv: u16,
14610    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14611    pub vel: u16,
14612    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14613    pub cog: u16,
14614    #[doc = "GPS fix type."]
14615    pub fix_type: GpsFixType,
14616    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14617    pub satellites_visible: u8,
14618    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14620    pub alt_ellipsoid: i32,
14621    #[doc = "Position uncertainty."]
14622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14623    pub h_acc: u32,
14624    #[doc = "Altitude uncertainty."]
14625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14626    pub v_acc: u32,
14627    #[doc = "Speed uncertainty."]
14628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14629    pub vel_acc: u32,
14630    #[doc = "Heading / track uncertainty"]
14631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14632    pub hdg_acc: u32,
14633    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14635    pub yaw: u16,
14636}
14637impl GPS_RAW_INT_DATA {
14638    pub const ENCODED_LEN: usize = 52usize;
14639    pub const DEFAULT: Self = Self {
14640        time_usec: 0_u64,
14641        lat: 0_i32,
14642        lon: 0_i32,
14643        alt: 0_i32,
14644        eph: 0_u16,
14645        epv: 0_u16,
14646        vel: 0_u16,
14647        cog: 0_u16,
14648        fix_type: GpsFixType::DEFAULT,
14649        satellites_visible: 0_u8,
14650        alt_ellipsoid: 0_i32,
14651        h_acc: 0_u32,
14652        v_acc: 0_u32,
14653        vel_acc: 0_u32,
14654        hdg_acc: 0_u32,
14655        yaw: 0_u16,
14656    };
14657    #[cfg(feature = "arbitrary")]
14658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14659        use arbitrary::{Arbitrary, Unstructured};
14660        let mut buf = [0u8; 1024];
14661        rng.fill_bytes(&mut buf);
14662        let mut unstructured = Unstructured::new(&buf);
14663        Self::arbitrary(&mut unstructured).unwrap_or_default()
14664    }
14665}
14666impl Default for GPS_RAW_INT_DATA {
14667    fn default() -> Self {
14668        Self::DEFAULT.clone()
14669    }
14670}
14671impl MessageData for GPS_RAW_INT_DATA {
14672    type Message = MavMessage;
14673    const ID: u32 = 24u32;
14674    const NAME: &'static str = "GPS_RAW_INT";
14675    const EXTRA_CRC: u8 = 24u8;
14676    const ENCODED_LEN: usize = 52usize;
14677    fn deser(
14678        _version: MavlinkVersion,
14679        __input: &[u8],
14680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14681        let avail_len = __input.len();
14682        let mut payload_buf = [0; Self::ENCODED_LEN];
14683        let mut buf = if avail_len < Self::ENCODED_LEN {
14684            payload_buf[0..avail_len].copy_from_slice(__input);
14685            Bytes::new(&payload_buf)
14686        } else {
14687            Bytes::new(__input)
14688        };
14689        let mut __struct = Self::default();
14690        __struct.time_usec = buf.get_u64_le();
14691        __struct.lat = buf.get_i32_le();
14692        __struct.lon = buf.get_i32_le();
14693        __struct.alt = buf.get_i32_le();
14694        __struct.eph = buf.get_u16_le();
14695        __struct.epv = buf.get_u16_le();
14696        __struct.vel = buf.get_u16_le();
14697        __struct.cog = buf.get_u16_le();
14698        let tmp = buf.get_u8();
14699        __struct.fix_type =
14700            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14701                enum_type: "GpsFixType",
14702                value: tmp as u32,
14703            })?;
14704        __struct.satellites_visible = buf.get_u8();
14705        __struct.alt_ellipsoid = buf.get_i32_le();
14706        __struct.h_acc = buf.get_u32_le();
14707        __struct.v_acc = buf.get_u32_le();
14708        __struct.vel_acc = buf.get_u32_le();
14709        __struct.hdg_acc = buf.get_u32_le();
14710        __struct.yaw = buf.get_u16_le();
14711        Ok(__struct)
14712    }
14713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14714        let mut __tmp = BytesMut::new(bytes);
14715        #[allow(clippy::absurd_extreme_comparisons)]
14716        #[allow(unused_comparisons)]
14717        if __tmp.remaining() < Self::ENCODED_LEN {
14718            panic!(
14719                "buffer is too small (need {} bytes, but got {})",
14720                Self::ENCODED_LEN,
14721                __tmp.remaining(),
14722            )
14723        }
14724        __tmp.put_u64_le(self.time_usec);
14725        __tmp.put_i32_le(self.lat);
14726        __tmp.put_i32_le(self.lon);
14727        __tmp.put_i32_le(self.alt);
14728        __tmp.put_u16_le(self.eph);
14729        __tmp.put_u16_le(self.epv);
14730        __tmp.put_u16_le(self.vel);
14731        __tmp.put_u16_le(self.cog);
14732        __tmp.put_u8(self.fix_type as u8);
14733        __tmp.put_u8(self.satellites_visible);
14734        __tmp.put_i32_le(self.alt_ellipsoid);
14735        __tmp.put_u32_le(self.h_acc);
14736        __tmp.put_u32_le(self.v_acc);
14737        __tmp.put_u32_le(self.vel_acc);
14738        __tmp.put_u32_le(self.hdg_acc);
14739        __tmp.put_u16_le(self.yaw);
14740        if matches!(version, MavlinkVersion::V2) {
14741            let len = __tmp.len();
14742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14743        } else {
14744            __tmp.len()
14745        }
14746    }
14747}
14748#[doc = "id: 233"]
14749#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14750#[derive(Debug, Clone, PartialEq)]
14751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14753pub struct GPS_RTCM_DATA_DATA {
14754    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14755    pub flags: u8,
14756    #[doc = "data length"]
14757    pub len: u8,
14758    #[doc = "RTCM message (may be fragmented)"]
14759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14760    pub data: [u8; 180],
14761}
14762impl GPS_RTCM_DATA_DATA {
14763    pub const ENCODED_LEN: usize = 182usize;
14764    pub const DEFAULT: Self = Self {
14765        flags: 0_u8,
14766        len: 0_u8,
14767        data: [0_u8; 180usize],
14768    };
14769    #[cfg(feature = "arbitrary")]
14770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14771        use arbitrary::{Arbitrary, Unstructured};
14772        let mut buf = [0u8; 1024];
14773        rng.fill_bytes(&mut buf);
14774        let mut unstructured = Unstructured::new(&buf);
14775        Self::arbitrary(&mut unstructured).unwrap_or_default()
14776    }
14777}
14778impl Default for GPS_RTCM_DATA_DATA {
14779    fn default() -> Self {
14780        Self::DEFAULT.clone()
14781    }
14782}
14783impl MessageData for GPS_RTCM_DATA_DATA {
14784    type Message = MavMessage;
14785    const ID: u32 = 233u32;
14786    const NAME: &'static str = "GPS_RTCM_DATA";
14787    const EXTRA_CRC: u8 = 35u8;
14788    const ENCODED_LEN: usize = 182usize;
14789    fn deser(
14790        _version: MavlinkVersion,
14791        __input: &[u8],
14792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14793        let avail_len = __input.len();
14794        let mut payload_buf = [0; Self::ENCODED_LEN];
14795        let mut buf = if avail_len < Self::ENCODED_LEN {
14796            payload_buf[0..avail_len].copy_from_slice(__input);
14797            Bytes::new(&payload_buf)
14798        } else {
14799            Bytes::new(__input)
14800        };
14801        let mut __struct = Self::default();
14802        __struct.flags = buf.get_u8();
14803        __struct.len = buf.get_u8();
14804        for v in &mut __struct.data {
14805            let val = buf.get_u8();
14806            *v = val;
14807        }
14808        Ok(__struct)
14809    }
14810    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14811        let mut __tmp = BytesMut::new(bytes);
14812        #[allow(clippy::absurd_extreme_comparisons)]
14813        #[allow(unused_comparisons)]
14814        if __tmp.remaining() < Self::ENCODED_LEN {
14815            panic!(
14816                "buffer is too small (need {} bytes, but got {})",
14817                Self::ENCODED_LEN,
14818                __tmp.remaining(),
14819            )
14820        }
14821        __tmp.put_u8(self.flags);
14822        __tmp.put_u8(self.len);
14823        for val in &self.data {
14824            __tmp.put_u8(*val);
14825        }
14826        if matches!(version, MavlinkVersion::V2) {
14827            let len = __tmp.len();
14828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14829        } else {
14830            __tmp.len()
14831        }
14832    }
14833}
14834#[doc = "id: 127"]
14835#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14836#[derive(Debug, Clone, PartialEq)]
14837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14839pub struct GPS_RTK_DATA {
14840    #[doc = "Time since boot of last baseline message received."]
14841    pub time_last_baseline_ms: u32,
14842    #[doc = "GPS Time of Week of last baseline"]
14843    pub tow: u32,
14844    #[doc = "Current baseline in ECEF x or NED north component."]
14845    pub baseline_a_mm: i32,
14846    #[doc = "Current baseline in ECEF y or NED east component."]
14847    pub baseline_b_mm: i32,
14848    #[doc = "Current baseline in ECEF z or NED down component."]
14849    pub baseline_c_mm: i32,
14850    #[doc = "Current estimate of baseline accuracy."]
14851    pub accuracy: u32,
14852    #[doc = "Current number of integer ambiguity hypotheses."]
14853    pub iar_num_hypotheses: i32,
14854    #[doc = "GPS Week Number of last baseline"]
14855    pub wn: u16,
14856    #[doc = "Identification of connected RTK receiver."]
14857    pub rtk_receiver_id: u8,
14858    #[doc = "GPS-specific health report for RTK data."]
14859    pub rtk_health: u8,
14860    #[doc = "Rate of baseline messages being received by GPS"]
14861    pub rtk_rate: u8,
14862    #[doc = "Current number of sats used for RTK calculation."]
14863    pub nsats: u8,
14864    #[doc = "Coordinate system of baseline"]
14865    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14866}
14867impl GPS_RTK_DATA {
14868    pub const ENCODED_LEN: usize = 35usize;
14869    pub const DEFAULT: Self = Self {
14870        time_last_baseline_ms: 0_u32,
14871        tow: 0_u32,
14872        baseline_a_mm: 0_i32,
14873        baseline_b_mm: 0_i32,
14874        baseline_c_mm: 0_i32,
14875        accuracy: 0_u32,
14876        iar_num_hypotheses: 0_i32,
14877        wn: 0_u16,
14878        rtk_receiver_id: 0_u8,
14879        rtk_health: 0_u8,
14880        rtk_rate: 0_u8,
14881        nsats: 0_u8,
14882        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14883    };
14884    #[cfg(feature = "arbitrary")]
14885    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14886        use arbitrary::{Arbitrary, Unstructured};
14887        let mut buf = [0u8; 1024];
14888        rng.fill_bytes(&mut buf);
14889        let mut unstructured = Unstructured::new(&buf);
14890        Self::arbitrary(&mut unstructured).unwrap_or_default()
14891    }
14892}
14893impl Default for GPS_RTK_DATA {
14894    fn default() -> Self {
14895        Self::DEFAULT.clone()
14896    }
14897}
14898impl MessageData for GPS_RTK_DATA {
14899    type Message = MavMessage;
14900    const ID: u32 = 127u32;
14901    const NAME: &'static str = "GPS_RTK";
14902    const EXTRA_CRC: u8 = 25u8;
14903    const ENCODED_LEN: usize = 35usize;
14904    fn deser(
14905        _version: MavlinkVersion,
14906        __input: &[u8],
14907    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14908        let avail_len = __input.len();
14909        let mut payload_buf = [0; Self::ENCODED_LEN];
14910        let mut buf = if avail_len < Self::ENCODED_LEN {
14911            payload_buf[0..avail_len].copy_from_slice(__input);
14912            Bytes::new(&payload_buf)
14913        } else {
14914            Bytes::new(__input)
14915        };
14916        let mut __struct = Self::default();
14917        __struct.time_last_baseline_ms = buf.get_u32_le();
14918        __struct.tow = buf.get_u32_le();
14919        __struct.baseline_a_mm = buf.get_i32_le();
14920        __struct.baseline_b_mm = buf.get_i32_le();
14921        __struct.baseline_c_mm = buf.get_i32_le();
14922        __struct.accuracy = buf.get_u32_le();
14923        __struct.iar_num_hypotheses = buf.get_i32_le();
14924        __struct.wn = buf.get_u16_le();
14925        __struct.rtk_receiver_id = buf.get_u8();
14926        __struct.rtk_health = buf.get_u8();
14927        __struct.rtk_rate = buf.get_u8();
14928        __struct.nsats = buf.get_u8();
14929        let tmp = buf.get_u8();
14930        __struct.baseline_coords_type =
14931            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14932                enum_type: "RtkBaselineCoordinateSystem",
14933                value: tmp as u32,
14934            })?;
14935        Ok(__struct)
14936    }
14937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14938        let mut __tmp = BytesMut::new(bytes);
14939        #[allow(clippy::absurd_extreme_comparisons)]
14940        #[allow(unused_comparisons)]
14941        if __tmp.remaining() < Self::ENCODED_LEN {
14942            panic!(
14943                "buffer is too small (need {} bytes, but got {})",
14944                Self::ENCODED_LEN,
14945                __tmp.remaining(),
14946            )
14947        }
14948        __tmp.put_u32_le(self.time_last_baseline_ms);
14949        __tmp.put_u32_le(self.tow);
14950        __tmp.put_i32_le(self.baseline_a_mm);
14951        __tmp.put_i32_le(self.baseline_b_mm);
14952        __tmp.put_i32_le(self.baseline_c_mm);
14953        __tmp.put_u32_le(self.accuracy);
14954        __tmp.put_i32_le(self.iar_num_hypotheses);
14955        __tmp.put_u16_le(self.wn);
14956        __tmp.put_u8(self.rtk_receiver_id);
14957        __tmp.put_u8(self.rtk_health);
14958        __tmp.put_u8(self.rtk_rate);
14959        __tmp.put_u8(self.nsats);
14960        __tmp.put_u8(self.baseline_coords_type as u8);
14961        if matches!(version, MavlinkVersion::V2) {
14962            let len = __tmp.len();
14963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14964        } else {
14965            __tmp.len()
14966        }
14967    }
14968}
14969#[doc = "id: 25"]
14970#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14971#[derive(Debug, Clone, PartialEq)]
14972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14974pub struct GPS_STATUS_DATA {
14975    #[doc = "Number of satellites visible"]
14976    pub satellites_visible: u8,
14977    #[doc = "Global satellite ID"]
14978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14979    pub satellite_prn: [u8; 20],
14980    #[doc = "0: Satellite not used, 1: used for localization"]
14981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14982    pub satellite_used: [u8; 20],
14983    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14985    pub satellite_elevation: [u8; 20],
14986    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14988    pub satellite_azimuth: [u8; 20],
14989    #[doc = "Signal to noise ratio of satellite"]
14990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14991    pub satellite_snr: [u8; 20],
14992}
14993impl GPS_STATUS_DATA {
14994    pub const ENCODED_LEN: usize = 101usize;
14995    pub const DEFAULT: Self = Self {
14996        satellites_visible: 0_u8,
14997        satellite_prn: [0_u8; 20usize],
14998        satellite_used: [0_u8; 20usize],
14999        satellite_elevation: [0_u8; 20usize],
15000        satellite_azimuth: [0_u8; 20usize],
15001        satellite_snr: [0_u8; 20usize],
15002    };
15003    #[cfg(feature = "arbitrary")]
15004    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15005        use arbitrary::{Arbitrary, Unstructured};
15006        let mut buf = [0u8; 1024];
15007        rng.fill_bytes(&mut buf);
15008        let mut unstructured = Unstructured::new(&buf);
15009        Self::arbitrary(&mut unstructured).unwrap_or_default()
15010    }
15011}
15012impl Default for GPS_STATUS_DATA {
15013    fn default() -> Self {
15014        Self::DEFAULT.clone()
15015    }
15016}
15017impl MessageData for GPS_STATUS_DATA {
15018    type Message = MavMessage;
15019    const ID: u32 = 25u32;
15020    const NAME: &'static str = "GPS_STATUS";
15021    const EXTRA_CRC: u8 = 23u8;
15022    const ENCODED_LEN: usize = 101usize;
15023    fn deser(
15024        _version: MavlinkVersion,
15025        __input: &[u8],
15026    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15027        let avail_len = __input.len();
15028        let mut payload_buf = [0; Self::ENCODED_LEN];
15029        let mut buf = if avail_len < Self::ENCODED_LEN {
15030            payload_buf[0..avail_len].copy_from_slice(__input);
15031            Bytes::new(&payload_buf)
15032        } else {
15033            Bytes::new(__input)
15034        };
15035        let mut __struct = Self::default();
15036        __struct.satellites_visible = buf.get_u8();
15037        for v in &mut __struct.satellite_prn {
15038            let val = buf.get_u8();
15039            *v = val;
15040        }
15041        for v in &mut __struct.satellite_used {
15042            let val = buf.get_u8();
15043            *v = val;
15044        }
15045        for v in &mut __struct.satellite_elevation {
15046            let val = buf.get_u8();
15047            *v = val;
15048        }
15049        for v in &mut __struct.satellite_azimuth {
15050            let val = buf.get_u8();
15051            *v = val;
15052        }
15053        for v in &mut __struct.satellite_snr {
15054            let val = buf.get_u8();
15055            *v = val;
15056        }
15057        Ok(__struct)
15058    }
15059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15060        let mut __tmp = BytesMut::new(bytes);
15061        #[allow(clippy::absurd_extreme_comparisons)]
15062        #[allow(unused_comparisons)]
15063        if __tmp.remaining() < Self::ENCODED_LEN {
15064            panic!(
15065                "buffer is too small (need {} bytes, but got {})",
15066                Self::ENCODED_LEN,
15067                __tmp.remaining(),
15068            )
15069        }
15070        __tmp.put_u8(self.satellites_visible);
15071        for val in &self.satellite_prn {
15072            __tmp.put_u8(*val);
15073        }
15074        for val in &self.satellite_used {
15075            __tmp.put_u8(*val);
15076        }
15077        for val in &self.satellite_elevation {
15078            __tmp.put_u8(*val);
15079        }
15080        for val in &self.satellite_azimuth {
15081            __tmp.put_u8(*val);
15082        }
15083        for val in &self.satellite_snr {
15084            __tmp.put_u8(*val);
15085        }
15086        if matches!(version, MavlinkVersion::V2) {
15087            let len = __tmp.len();
15088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15089        } else {
15090            __tmp.len()
15091        }
15092    }
15093}
15094#[doc = "id: 0"]
15095#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15096#[derive(Debug, Clone, PartialEq)]
15097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15099pub struct HEARTBEAT_DATA {
15100    #[doc = "A bitfield for use for autopilot-specific flags"]
15101    pub custom_mode: u32,
15102    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15103    pub mavtype: MavType,
15104    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15105    pub autopilot: MavAutopilot,
15106    #[doc = "System mode bitmap."]
15107    pub base_mode: MavModeFlag,
15108    #[doc = "System status flag."]
15109    pub system_status: MavState,
15110    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15111    pub mavlink_version: u8,
15112}
15113impl HEARTBEAT_DATA {
15114    pub const ENCODED_LEN: usize = 9usize;
15115    pub const DEFAULT: Self = Self {
15116        custom_mode: 0_u32,
15117        mavtype: MavType::DEFAULT,
15118        autopilot: MavAutopilot::DEFAULT,
15119        base_mode: MavModeFlag::DEFAULT,
15120        system_status: MavState::DEFAULT,
15121        mavlink_version: MINOR_MAVLINK_VERSION,
15122    };
15123    #[cfg(feature = "arbitrary")]
15124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15125        use arbitrary::{Arbitrary, Unstructured};
15126        let mut buf = [0u8; 1024];
15127        rng.fill_bytes(&mut buf);
15128        let mut unstructured = Unstructured::new(&buf);
15129        Self::arbitrary(&mut unstructured).unwrap_or_default()
15130    }
15131}
15132impl Default for HEARTBEAT_DATA {
15133    fn default() -> Self {
15134        Self::DEFAULT.clone()
15135    }
15136}
15137impl MessageData for HEARTBEAT_DATA {
15138    type Message = MavMessage;
15139    const ID: u32 = 0u32;
15140    const NAME: &'static str = "HEARTBEAT";
15141    const EXTRA_CRC: u8 = 50u8;
15142    const ENCODED_LEN: usize = 9usize;
15143    fn deser(
15144        _version: MavlinkVersion,
15145        __input: &[u8],
15146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15147        let avail_len = __input.len();
15148        let mut payload_buf = [0; Self::ENCODED_LEN];
15149        let mut buf = if avail_len < Self::ENCODED_LEN {
15150            payload_buf[0..avail_len].copy_from_slice(__input);
15151            Bytes::new(&payload_buf)
15152        } else {
15153            Bytes::new(__input)
15154        };
15155        let mut __struct = Self::default();
15156        __struct.custom_mode = buf.get_u32_le();
15157        let tmp = buf.get_u8();
15158        __struct.mavtype =
15159            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15160                enum_type: "MavType",
15161                value: tmp as u32,
15162            })?;
15163        let tmp = buf.get_u8();
15164        __struct.autopilot =
15165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15166                enum_type: "MavAutopilot",
15167                value: tmp as u32,
15168            })?;
15169        let tmp = buf.get_u8();
15170        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15171            ::mavlink_core::error::ParserError::InvalidFlag {
15172                flag_type: "MavModeFlag",
15173                value: tmp as u32,
15174            },
15175        )?;
15176        let tmp = buf.get_u8();
15177        __struct.system_status =
15178            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15179                enum_type: "MavState",
15180                value: tmp as u32,
15181            })?;
15182        __struct.mavlink_version = buf.get_u8();
15183        Ok(__struct)
15184    }
15185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15186        let mut __tmp = BytesMut::new(bytes);
15187        #[allow(clippy::absurd_extreme_comparisons)]
15188        #[allow(unused_comparisons)]
15189        if __tmp.remaining() < Self::ENCODED_LEN {
15190            panic!(
15191                "buffer is too small (need {} bytes, but got {})",
15192                Self::ENCODED_LEN,
15193                __tmp.remaining(),
15194            )
15195        }
15196        __tmp.put_u32_le(self.custom_mode);
15197        __tmp.put_u8(self.mavtype as u8);
15198        __tmp.put_u8(self.autopilot as u8);
15199        __tmp.put_u8(self.base_mode.bits());
15200        __tmp.put_u8(self.system_status as u8);
15201        __tmp.put_u8(self.mavlink_version);
15202        if matches!(version, MavlinkVersion::V2) {
15203            let len = __tmp.len();
15204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15205        } else {
15206            __tmp.len()
15207        }
15208    }
15209}
15210#[doc = "id: 105"]
15211#[doc = "The IMU readings in SI units in NED body frame."]
15212#[derive(Debug, Clone, PartialEq)]
15213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15215pub struct HIGHRES_IMU_DATA {
15216    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15217    pub time_usec: u64,
15218    #[doc = "X acceleration"]
15219    pub xacc: f32,
15220    #[doc = "Y acceleration"]
15221    pub yacc: f32,
15222    #[doc = "Z acceleration"]
15223    pub zacc: f32,
15224    #[doc = "Angular speed around X axis"]
15225    pub xgyro: f32,
15226    #[doc = "Angular speed around Y axis"]
15227    pub ygyro: f32,
15228    #[doc = "Angular speed around Z axis"]
15229    pub zgyro: f32,
15230    #[doc = "X Magnetic field"]
15231    pub xmag: f32,
15232    #[doc = "Y Magnetic field"]
15233    pub ymag: f32,
15234    #[doc = "Z Magnetic field"]
15235    pub zmag: f32,
15236    #[doc = "Absolute pressure"]
15237    pub abs_pressure: f32,
15238    #[doc = "Differential pressure"]
15239    pub diff_pressure: f32,
15240    #[doc = "Altitude calculated from pressure"]
15241    pub pressure_alt: f32,
15242    #[doc = "Temperature"]
15243    pub temperature: f32,
15244    #[doc = "Bitmap for fields that have updated since last message"]
15245    pub fields_updated: HighresImuUpdatedFlags,
15246    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15248    pub id: u8,
15249}
15250impl HIGHRES_IMU_DATA {
15251    pub const ENCODED_LEN: usize = 63usize;
15252    pub const DEFAULT: Self = Self {
15253        time_usec: 0_u64,
15254        xacc: 0.0_f32,
15255        yacc: 0.0_f32,
15256        zacc: 0.0_f32,
15257        xgyro: 0.0_f32,
15258        ygyro: 0.0_f32,
15259        zgyro: 0.0_f32,
15260        xmag: 0.0_f32,
15261        ymag: 0.0_f32,
15262        zmag: 0.0_f32,
15263        abs_pressure: 0.0_f32,
15264        diff_pressure: 0.0_f32,
15265        pressure_alt: 0.0_f32,
15266        temperature: 0.0_f32,
15267        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15268        id: 0_u8,
15269    };
15270    #[cfg(feature = "arbitrary")]
15271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15272        use arbitrary::{Arbitrary, Unstructured};
15273        let mut buf = [0u8; 1024];
15274        rng.fill_bytes(&mut buf);
15275        let mut unstructured = Unstructured::new(&buf);
15276        Self::arbitrary(&mut unstructured).unwrap_or_default()
15277    }
15278}
15279impl Default for HIGHRES_IMU_DATA {
15280    fn default() -> Self {
15281        Self::DEFAULT.clone()
15282    }
15283}
15284impl MessageData for HIGHRES_IMU_DATA {
15285    type Message = MavMessage;
15286    const ID: u32 = 105u32;
15287    const NAME: &'static str = "HIGHRES_IMU";
15288    const EXTRA_CRC: u8 = 93u8;
15289    const ENCODED_LEN: usize = 63usize;
15290    fn deser(
15291        _version: MavlinkVersion,
15292        __input: &[u8],
15293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15294        let avail_len = __input.len();
15295        let mut payload_buf = [0; Self::ENCODED_LEN];
15296        let mut buf = if avail_len < Self::ENCODED_LEN {
15297            payload_buf[0..avail_len].copy_from_slice(__input);
15298            Bytes::new(&payload_buf)
15299        } else {
15300            Bytes::new(__input)
15301        };
15302        let mut __struct = Self::default();
15303        __struct.time_usec = buf.get_u64_le();
15304        __struct.xacc = buf.get_f32_le();
15305        __struct.yacc = buf.get_f32_le();
15306        __struct.zacc = buf.get_f32_le();
15307        __struct.xgyro = buf.get_f32_le();
15308        __struct.ygyro = buf.get_f32_le();
15309        __struct.zgyro = buf.get_f32_le();
15310        __struct.xmag = buf.get_f32_le();
15311        __struct.ymag = buf.get_f32_le();
15312        __struct.zmag = buf.get_f32_le();
15313        __struct.abs_pressure = buf.get_f32_le();
15314        __struct.diff_pressure = buf.get_f32_le();
15315        __struct.pressure_alt = buf.get_f32_le();
15316        __struct.temperature = buf.get_f32_le();
15317        let tmp = buf.get_u16_le();
15318        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15319            tmp & HighresImuUpdatedFlags::all().bits(),
15320        )
15321        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15322            flag_type: "HighresImuUpdatedFlags",
15323            value: tmp as u32,
15324        })?;
15325        __struct.id = buf.get_u8();
15326        Ok(__struct)
15327    }
15328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15329        let mut __tmp = BytesMut::new(bytes);
15330        #[allow(clippy::absurd_extreme_comparisons)]
15331        #[allow(unused_comparisons)]
15332        if __tmp.remaining() < Self::ENCODED_LEN {
15333            panic!(
15334                "buffer is too small (need {} bytes, but got {})",
15335                Self::ENCODED_LEN,
15336                __tmp.remaining(),
15337            )
15338        }
15339        __tmp.put_u64_le(self.time_usec);
15340        __tmp.put_f32_le(self.xacc);
15341        __tmp.put_f32_le(self.yacc);
15342        __tmp.put_f32_le(self.zacc);
15343        __tmp.put_f32_le(self.xgyro);
15344        __tmp.put_f32_le(self.ygyro);
15345        __tmp.put_f32_le(self.zgyro);
15346        __tmp.put_f32_le(self.xmag);
15347        __tmp.put_f32_le(self.ymag);
15348        __tmp.put_f32_le(self.zmag);
15349        __tmp.put_f32_le(self.abs_pressure);
15350        __tmp.put_f32_le(self.diff_pressure);
15351        __tmp.put_f32_le(self.pressure_alt);
15352        __tmp.put_f32_le(self.temperature);
15353        __tmp.put_u16_le(self.fields_updated.bits());
15354        __tmp.put_u8(self.id);
15355        if matches!(version, MavlinkVersion::V2) {
15356            let len = __tmp.len();
15357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15358        } else {
15359            __tmp.len()
15360        }
15361    }
15362}
15363#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15364#[doc = "id: 234"]
15365#[doc = "Message appropriate for high latency connections like Iridium."]
15366#[derive(Debug, Clone, PartialEq)]
15367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15369pub struct HIGH_LATENCY_DATA {
15370    #[doc = "A bitfield for use for autopilot-specific flags."]
15371    pub custom_mode: u32,
15372    #[doc = "Latitude"]
15373    pub latitude: i32,
15374    #[doc = "Longitude"]
15375    pub longitude: i32,
15376    #[doc = "roll"]
15377    pub roll: i16,
15378    #[doc = "pitch"]
15379    pub pitch: i16,
15380    #[doc = "heading"]
15381    pub heading: u16,
15382    #[doc = "heading setpoint"]
15383    pub heading_sp: i16,
15384    #[doc = "Altitude above mean sea level"]
15385    pub altitude_amsl: i16,
15386    #[doc = "Altitude setpoint relative to the home position"]
15387    pub altitude_sp: i16,
15388    #[doc = "distance to target"]
15389    pub wp_distance: u16,
15390    #[doc = "Bitmap of enabled system modes."]
15391    pub base_mode: MavModeFlag,
15392    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15393    pub landed_state: MavLandedState,
15394    #[doc = "throttle (percentage)"]
15395    pub throttle: i8,
15396    #[doc = "airspeed"]
15397    pub airspeed: u8,
15398    #[doc = "airspeed setpoint"]
15399    pub airspeed_sp: u8,
15400    #[doc = "groundspeed"]
15401    pub groundspeed: u8,
15402    #[doc = "climb rate"]
15403    pub climb_rate: i8,
15404    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15405    pub gps_nsat: u8,
15406    #[doc = "GPS Fix type."]
15407    pub gps_fix_type: GpsFixType,
15408    #[doc = "Remaining battery (percentage)"]
15409    pub battery_remaining: u8,
15410    #[doc = "Autopilot temperature (degrees C)"]
15411    pub temperature: i8,
15412    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15413    pub temperature_air: i8,
15414    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15415    pub failsafe: u8,
15416    #[doc = "current waypoint number"]
15417    pub wp_num: u8,
15418}
15419impl HIGH_LATENCY_DATA {
15420    pub const ENCODED_LEN: usize = 40usize;
15421    pub const DEFAULT: Self = Self {
15422        custom_mode: 0_u32,
15423        latitude: 0_i32,
15424        longitude: 0_i32,
15425        roll: 0_i16,
15426        pitch: 0_i16,
15427        heading: 0_u16,
15428        heading_sp: 0_i16,
15429        altitude_amsl: 0_i16,
15430        altitude_sp: 0_i16,
15431        wp_distance: 0_u16,
15432        base_mode: MavModeFlag::DEFAULT,
15433        landed_state: MavLandedState::DEFAULT,
15434        throttle: 0_i8,
15435        airspeed: 0_u8,
15436        airspeed_sp: 0_u8,
15437        groundspeed: 0_u8,
15438        climb_rate: 0_i8,
15439        gps_nsat: 0_u8,
15440        gps_fix_type: GpsFixType::DEFAULT,
15441        battery_remaining: 0_u8,
15442        temperature: 0_i8,
15443        temperature_air: 0_i8,
15444        failsafe: 0_u8,
15445        wp_num: 0_u8,
15446    };
15447    #[cfg(feature = "arbitrary")]
15448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15449        use arbitrary::{Arbitrary, Unstructured};
15450        let mut buf = [0u8; 1024];
15451        rng.fill_bytes(&mut buf);
15452        let mut unstructured = Unstructured::new(&buf);
15453        Self::arbitrary(&mut unstructured).unwrap_or_default()
15454    }
15455}
15456impl Default for HIGH_LATENCY_DATA {
15457    fn default() -> Self {
15458        Self::DEFAULT.clone()
15459    }
15460}
15461impl MessageData for HIGH_LATENCY_DATA {
15462    type Message = MavMessage;
15463    const ID: u32 = 234u32;
15464    const NAME: &'static str = "HIGH_LATENCY";
15465    const EXTRA_CRC: u8 = 150u8;
15466    const ENCODED_LEN: usize = 40usize;
15467    fn deser(
15468        _version: MavlinkVersion,
15469        __input: &[u8],
15470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15471        let avail_len = __input.len();
15472        let mut payload_buf = [0; Self::ENCODED_LEN];
15473        let mut buf = if avail_len < Self::ENCODED_LEN {
15474            payload_buf[0..avail_len].copy_from_slice(__input);
15475            Bytes::new(&payload_buf)
15476        } else {
15477            Bytes::new(__input)
15478        };
15479        let mut __struct = Self::default();
15480        __struct.custom_mode = buf.get_u32_le();
15481        __struct.latitude = buf.get_i32_le();
15482        __struct.longitude = buf.get_i32_le();
15483        __struct.roll = buf.get_i16_le();
15484        __struct.pitch = buf.get_i16_le();
15485        __struct.heading = buf.get_u16_le();
15486        __struct.heading_sp = buf.get_i16_le();
15487        __struct.altitude_amsl = buf.get_i16_le();
15488        __struct.altitude_sp = buf.get_i16_le();
15489        __struct.wp_distance = buf.get_u16_le();
15490        let tmp = buf.get_u8();
15491        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15492            ::mavlink_core::error::ParserError::InvalidFlag {
15493                flag_type: "MavModeFlag",
15494                value: tmp as u32,
15495            },
15496        )?;
15497        let tmp = buf.get_u8();
15498        __struct.landed_state =
15499            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15500                enum_type: "MavLandedState",
15501                value: tmp as u32,
15502            })?;
15503        __struct.throttle = buf.get_i8();
15504        __struct.airspeed = buf.get_u8();
15505        __struct.airspeed_sp = buf.get_u8();
15506        __struct.groundspeed = buf.get_u8();
15507        __struct.climb_rate = buf.get_i8();
15508        __struct.gps_nsat = buf.get_u8();
15509        let tmp = buf.get_u8();
15510        __struct.gps_fix_type =
15511            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15512                enum_type: "GpsFixType",
15513                value: tmp as u32,
15514            })?;
15515        __struct.battery_remaining = buf.get_u8();
15516        __struct.temperature = buf.get_i8();
15517        __struct.temperature_air = buf.get_i8();
15518        __struct.failsafe = buf.get_u8();
15519        __struct.wp_num = buf.get_u8();
15520        Ok(__struct)
15521    }
15522    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15523        let mut __tmp = BytesMut::new(bytes);
15524        #[allow(clippy::absurd_extreme_comparisons)]
15525        #[allow(unused_comparisons)]
15526        if __tmp.remaining() < Self::ENCODED_LEN {
15527            panic!(
15528                "buffer is too small (need {} bytes, but got {})",
15529                Self::ENCODED_LEN,
15530                __tmp.remaining(),
15531            )
15532        }
15533        __tmp.put_u32_le(self.custom_mode);
15534        __tmp.put_i32_le(self.latitude);
15535        __tmp.put_i32_le(self.longitude);
15536        __tmp.put_i16_le(self.roll);
15537        __tmp.put_i16_le(self.pitch);
15538        __tmp.put_u16_le(self.heading);
15539        __tmp.put_i16_le(self.heading_sp);
15540        __tmp.put_i16_le(self.altitude_amsl);
15541        __tmp.put_i16_le(self.altitude_sp);
15542        __tmp.put_u16_le(self.wp_distance);
15543        __tmp.put_u8(self.base_mode.bits());
15544        __tmp.put_u8(self.landed_state as u8);
15545        __tmp.put_i8(self.throttle);
15546        __tmp.put_u8(self.airspeed);
15547        __tmp.put_u8(self.airspeed_sp);
15548        __tmp.put_u8(self.groundspeed);
15549        __tmp.put_i8(self.climb_rate);
15550        __tmp.put_u8(self.gps_nsat);
15551        __tmp.put_u8(self.gps_fix_type as u8);
15552        __tmp.put_u8(self.battery_remaining);
15553        __tmp.put_i8(self.temperature);
15554        __tmp.put_i8(self.temperature_air);
15555        __tmp.put_u8(self.failsafe);
15556        __tmp.put_u8(self.wp_num);
15557        if matches!(version, MavlinkVersion::V2) {
15558            let len = __tmp.len();
15559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15560        } else {
15561            __tmp.len()
15562        }
15563    }
15564}
15565#[doc = "id: 235"]
15566#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15567#[derive(Debug, Clone, PartialEq)]
15568#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15569#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15570pub struct HIGH_LATENCY2_DATA {
15571    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15572    pub timestamp: u32,
15573    #[doc = "Latitude"]
15574    pub latitude: i32,
15575    #[doc = "Longitude"]
15576    pub longitude: i32,
15577    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15578    pub custom_mode: u16,
15579    #[doc = "Altitude above mean sea level"]
15580    pub altitude: i16,
15581    #[doc = "Altitude setpoint"]
15582    pub target_altitude: i16,
15583    #[doc = "Distance to target waypoint or position"]
15584    pub target_distance: u16,
15585    #[doc = "Current waypoint number"]
15586    pub wp_num: u16,
15587    #[doc = "Bitmap of failure flags."]
15588    pub failure_flags: HlFailureFlag,
15589    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15590    pub mavtype: MavType,
15591    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15592    pub autopilot: MavAutopilot,
15593    #[doc = "Heading"]
15594    pub heading: u8,
15595    #[doc = "Heading setpoint"]
15596    pub target_heading: u8,
15597    #[doc = "Throttle"]
15598    pub throttle: u8,
15599    #[doc = "Airspeed"]
15600    pub airspeed: u8,
15601    #[doc = "Airspeed setpoint"]
15602    pub airspeed_sp: u8,
15603    #[doc = "Groundspeed"]
15604    pub groundspeed: u8,
15605    #[doc = "Windspeed"]
15606    pub windspeed: u8,
15607    #[doc = "Wind heading"]
15608    pub wind_heading: u8,
15609    #[doc = "Maximum error horizontal position since last message"]
15610    pub eph: u8,
15611    #[doc = "Maximum error vertical position since last message"]
15612    pub epv: u8,
15613    #[doc = "Air temperature"]
15614    pub temperature_air: i8,
15615    #[doc = "Maximum climb rate magnitude since last message"]
15616    pub climb_rate: i8,
15617    #[doc = "Battery level (-1 if field not provided)."]
15618    pub battery: i8,
15619    #[doc = "Field for custom payload."]
15620    pub custom0: i8,
15621    #[doc = "Field for custom payload."]
15622    pub custom1: i8,
15623    #[doc = "Field for custom payload."]
15624    pub custom2: i8,
15625}
15626impl HIGH_LATENCY2_DATA {
15627    pub const ENCODED_LEN: usize = 42usize;
15628    pub const DEFAULT: Self = Self {
15629        timestamp: 0_u32,
15630        latitude: 0_i32,
15631        longitude: 0_i32,
15632        custom_mode: 0_u16,
15633        altitude: 0_i16,
15634        target_altitude: 0_i16,
15635        target_distance: 0_u16,
15636        wp_num: 0_u16,
15637        failure_flags: HlFailureFlag::DEFAULT,
15638        mavtype: MavType::DEFAULT,
15639        autopilot: MavAutopilot::DEFAULT,
15640        heading: 0_u8,
15641        target_heading: 0_u8,
15642        throttle: 0_u8,
15643        airspeed: 0_u8,
15644        airspeed_sp: 0_u8,
15645        groundspeed: 0_u8,
15646        windspeed: 0_u8,
15647        wind_heading: 0_u8,
15648        eph: 0_u8,
15649        epv: 0_u8,
15650        temperature_air: 0_i8,
15651        climb_rate: 0_i8,
15652        battery: 0_i8,
15653        custom0: 0_i8,
15654        custom1: 0_i8,
15655        custom2: 0_i8,
15656    };
15657    #[cfg(feature = "arbitrary")]
15658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15659        use arbitrary::{Arbitrary, Unstructured};
15660        let mut buf = [0u8; 1024];
15661        rng.fill_bytes(&mut buf);
15662        let mut unstructured = Unstructured::new(&buf);
15663        Self::arbitrary(&mut unstructured).unwrap_or_default()
15664    }
15665}
15666impl Default for HIGH_LATENCY2_DATA {
15667    fn default() -> Self {
15668        Self::DEFAULT.clone()
15669    }
15670}
15671impl MessageData for HIGH_LATENCY2_DATA {
15672    type Message = MavMessage;
15673    const ID: u32 = 235u32;
15674    const NAME: &'static str = "HIGH_LATENCY2";
15675    const EXTRA_CRC: u8 = 179u8;
15676    const ENCODED_LEN: usize = 42usize;
15677    fn deser(
15678        _version: MavlinkVersion,
15679        __input: &[u8],
15680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15681        let avail_len = __input.len();
15682        let mut payload_buf = [0; Self::ENCODED_LEN];
15683        let mut buf = if avail_len < Self::ENCODED_LEN {
15684            payload_buf[0..avail_len].copy_from_slice(__input);
15685            Bytes::new(&payload_buf)
15686        } else {
15687            Bytes::new(__input)
15688        };
15689        let mut __struct = Self::default();
15690        __struct.timestamp = buf.get_u32_le();
15691        __struct.latitude = buf.get_i32_le();
15692        __struct.longitude = buf.get_i32_le();
15693        __struct.custom_mode = buf.get_u16_le();
15694        __struct.altitude = buf.get_i16_le();
15695        __struct.target_altitude = buf.get_i16_le();
15696        __struct.target_distance = buf.get_u16_le();
15697        __struct.wp_num = buf.get_u16_le();
15698        let tmp = buf.get_u16_le();
15699        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15700            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15701                flag_type: "HlFailureFlag",
15702                value: tmp as u32,
15703            })?;
15704        let tmp = buf.get_u8();
15705        __struct.mavtype =
15706            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15707                enum_type: "MavType",
15708                value: tmp as u32,
15709            })?;
15710        let tmp = buf.get_u8();
15711        __struct.autopilot =
15712            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15713                enum_type: "MavAutopilot",
15714                value: tmp as u32,
15715            })?;
15716        __struct.heading = buf.get_u8();
15717        __struct.target_heading = buf.get_u8();
15718        __struct.throttle = buf.get_u8();
15719        __struct.airspeed = buf.get_u8();
15720        __struct.airspeed_sp = buf.get_u8();
15721        __struct.groundspeed = buf.get_u8();
15722        __struct.windspeed = buf.get_u8();
15723        __struct.wind_heading = buf.get_u8();
15724        __struct.eph = buf.get_u8();
15725        __struct.epv = buf.get_u8();
15726        __struct.temperature_air = buf.get_i8();
15727        __struct.climb_rate = buf.get_i8();
15728        __struct.battery = buf.get_i8();
15729        __struct.custom0 = buf.get_i8();
15730        __struct.custom1 = buf.get_i8();
15731        __struct.custom2 = buf.get_i8();
15732        Ok(__struct)
15733    }
15734    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15735        let mut __tmp = BytesMut::new(bytes);
15736        #[allow(clippy::absurd_extreme_comparisons)]
15737        #[allow(unused_comparisons)]
15738        if __tmp.remaining() < Self::ENCODED_LEN {
15739            panic!(
15740                "buffer is too small (need {} bytes, but got {})",
15741                Self::ENCODED_LEN,
15742                __tmp.remaining(),
15743            )
15744        }
15745        __tmp.put_u32_le(self.timestamp);
15746        __tmp.put_i32_le(self.latitude);
15747        __tmp.put_i32_le(self.longitude);
15748        __tmp.put_u16_le(self.custom_mode);
15749        __tmp.put_i16_le(self.altitude);
15750        __tmp.put_i16_le(self.target_altitude);
15751        __tmp.put_u16_le(self.target_distance);
15752        __tmp.put_u16_le(self.wp_num);
15753        __tmp.put_u16_le(self.failure_flags.bits());
15754        __tmp.put_u8(self.mavtype as u8);
15755        __tmp.put_u8(self.autopilot as u8);
15756        __tmp.put_u8(self.heading);
15757        __tmp.put_u8(self.target_heading);
15758        __tmp.put_u8(self.throttle);
15759        __tmp.put_u8(self.airspeed);
15760        __tmp.put_u8(self.airspeed_sp);
15761        __tmp.put_u8(self.groundspeed);
15762        __tmp.put_u8(self.windspeed);
15763        __tmp.put_u8(self.wind_heading);
15764        __tmp.put_u8(self.eph);
15765        __tmp.put_u8(self.epv);
15766        __tmp.put_i8(self.temperature_air);
15767        __tmp.put_i8(self.climb_rate);
15768        __tmp.put_i8(self.battery);
15769        __tmp.put_i8(self.custom0);
15770        __tmp.put_i8(self.custom1);
15771        __tmp.put_i8(self.custom2);
15772        if matches!(version, MavlinkVersion::V2) {
15773            let len = __tmp.len();
15774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15775        } else {
15776            __tmp.len()
15777        }
15778    }
15779}
15780#[doc = "id: 93"]
15781#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15782#[derive(Debug, Clone, PartialEq)]
15783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15784#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15785pub struct HIL_ACTUATOR_CONTROLS_DATA {
15786    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15787    pub time_usec: u64,
15788    #[doc = "Flags bitmask."]
15789    pub flags: HilActuatorControlsFlags,
15790    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15791    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15792    pub controls: [f32; 16],
15793    #[doc = "System mode. Includes arming state."]
15794    pub mode: MavModeFlag,
15795}
15796impl HIL_ACTUATOR_CONTROLS_DATA {
15797    pub const ENCODED_LEN: usize = 81usize;
15798    pub const DEFAULT: Self = Self {
15799        time_usec: 0_u64,
15800        flags: HilActuatorControlsFlags::DEFAULT,
15801        controls: [0.0_f32; 16usize],
15802        mode: MavModeFlag::DEFAULT,
15803    };
15804    #[cfg(feature = "arbitrary")]
15805    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15806        use arbitrary::{Arbitrary, Unstructured};
15807        let mut buf = [0u8; 1024];
15808        rng.fill_bytes(&mut buf);
15809        let mut unstructured = Unstructured::new(&buf);
15810        Self::arbitrary(&mut unstructured).unwrap_or_default()
15811    }
15812}
15813impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15814    fn default() -> Self {
15815        Self::DEFAULT.clone()
15816    }
15817}
15818impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15819    type Message = MavMessage;
15820    const ID: u32 = 93u32;
15821    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15822    const EXTRA_CRC: u8 = 47u8;
15823    const ENCODED_LEN: usize = 81usize;
15824    fn deser(
15825        _version: MavlinkVersion,
15826        __input: &[u8],
15827    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15828        let avail_len = __input.len();
15829        let mut payload_buf = [0; Self::ENCODED_LEN];
15830        let mut buf = if avail_len < Self::ENCODED_LEN {
15831            payload_buf[0..avail_len].copy_from_slice(__input);
15832            Bytes::new(&payload_buf)
15833        } else {
15834            Bytes::new(__input)
15835        };
15836        let mut __struct = Self::default();
15837        __struct.time_usec = buf.get_u64_le();
15838        let tmp = buf.get_u64_le();
15839        __struct.flags =
15840            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15841                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15842                    flag_type: "HilActuatorControlsFlags",
15843                    value: tmp as u32,
15844                })?;
15845        for v in &mut __struct.controls {
15846            let val = buf.get_f32_le();
15847            *v = val;
15848        }
15849        let tmp = buf.get_u8();
15850        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15851            ::mavlink_core::error::ParserError::InvalidFlag {
15852                flag_type: "MavModeFlag",
15853                value: tmp as u32,
15854            },
15855        )?;
15856        Ok(__struct)
15857    }
15858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15859        let mut __tmp = BytesMut::new(bytes);
15860        #[allow(clippy::absurd_extreme_comparisons)]
15861        #[allow(unused_comparisons)]
15862        if __tmp.remaining() < Self::ENCODED_LEN {
15863            panic!(
15864                "buffer is too small (need {} bytes, but got {})",
15865                Self::ENCODED_LEN,
15866                __tmp.remaining(),
15867            )
15868        }
15869        __tmp.put_u64_le(self.time_usec);
15870        __tmp.put_u64_le(self.flags.bits());
15871        for val in &self.controls {
15872            __tmp.put_f32_le(*val);
15873        }
15874        __tmp.put_u8(self.mode.bits());
15875        if matches!(version, MavlinkVersion::V2) {
15876            let len = __tmp.len();
15877            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15878        } else {
15879            __tmp.len()
15880        }
15881    }
15882}
15883#[doc = "id: 91"]
15884#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15885#[derive(Debug, Clone, PartialEq)]
15886#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15887#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15888pub struct HIL_CONTROLS_DATA {
15889    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15890    pub time_usec: u64,
15891    #[doc = "Control output -1 .. 1"]
15892    pub roll_ailerons: f32,
15893    #[doc = "Control output -1 .. 1"]
15894    pub pitch_elevator: f32,
15895    #[doc = "Control output -1 .. 1"]
15896    pub yaw_rudder: f32,
15897    #[doc = "Throttle 0 .. 1"]
15898    pub throttle: f32,
15899    #[doc = "Aux 1, -1 .. 1"]
15900    pub aux1: f32,
15901    #[doc = "Aux 2, -1 .. 1"]
15902    pub aux2: f32,
15903    #[doc = "Aux 3, -1 .. 1"]
15904    pub aux3: f32,
15905    #[doc = "Aux 4, -1 .. 1"]
15906    pub aux4: f32,
15907    #[doc = "System mode."]
15908    pub mode: MavMode,
15909    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15910    pub nav_mode: u8,
15911}
15912impl HIL_CONTROLS_DATA {
15913    pub const ENCODED_LEN: usize = 42usize;
15914    pub const DEFAULT: Self = Self {
15915        time_usec: 0_u64,
15916        roll_ailerons: 0.0_f32,
15917        pitch_elevator: 0.0_f32,
15918        yaw_rudder: 0.0_f32,
15919        throttle: 0.0_f32,
15920        aux1: 0.0_f32,
15921        aux2: 0.0_f32,
15922        aux3: 0.0_f32,
15923        aux4: 0.0_f32,
15924        mode: MavMode::DEFAULT,
15925        nav_mode: 0_u8,
15926    };
15927    #[cfg(feature = "arbitrary")]
15928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15929        use arbitrary::{Arbitrary, Unstructured};
15930        let mut buf = [0u8; 1024];
15931        rng.fill_bytes(&mut buf);
15932        let mut unstructured = Unstructured::new(&buf);
15933        Self::arbitrary(&mut unstructured).unwrap_or_default()
15934    }
15935}
15936impl Default for HIL_CONTROLS_DATA {
15937    fn default() -> Self {
15938        Self::DEFAULT.clone()
15939    }
15940}
15941impl MessageData for HIL_CONTROLS_DATA {
15942    type Message = MavMessage;
15943    const ID: u32 = 91u32;
15944    const NAME: &'static str = "HIL_CONTROLS";
15945    const EXTRA_CRC: u8 = 63u8;
15946    const ENCODED_LEN: usize = 42usize;
15947    fn deser(
15948        _version: MavlinkVersion,
15949        __input: &[u8],
15950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15951        let avail_len = __input.len();
15952        let mut payload_buf = [0; Self::ENCODED_LEN];
15953        let mut buf = if avail_len < Self::ENCODED_LEN {
15954            payload_buf[0..avail_len].copy_from_slice(__input);
15955            Bytes::new(&payload_buf)
15956        } else {
15957            Bytes::new(__input)
15958        };
15959        let mut __struct = Self::default();
15960        __struct.time_usec = buf.get_u64_le();
15961        __struct.roll_ailerons = buf.get_f32_le();
15962        __struct.pitch_elevator = buf.get_f32_le();
15963        __struct.yaw_rudder = buf.get_f32_le();
15964        __struct.throttle = buf.get_f32_le();
15965        __struct.aux1 = buf.get_f32_le();
15966        __struct.aux2 = buf.get_f32_le();
15967        __struct.aux3 = buf.get_f32_le();
15968        __struct.aux4 = buf.get_f32_le();
15969        let tmp = buf.get_u8();
15970        __struct.mode =
15971            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15972                enum_type: "MavMode",
15973                value: tmp as u32,
15974            })?;
15975        __struct.nav_mode = buf.get_u8();
15976        Ok(__struct)
15977    }
15978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15979        let mut __tmp = BytesMut::new(bytes);
15980        #[allow(clippy::absurd_extreme_comparisons)]
15981        #[allow(unused_comparisons)]
15982        if __tmp.remaining() < Self::ENCODED_LEN {
15983            panic!(
15984                "buffer is too small (need {} bytes, but got {})",
15985                Self::ENCODED_LEN,
15986                __tmp.remaining(),
15987            )
15988        }
15989        __tmp.put_u64_le(self.time_usec);
15990        __tmp.put_f32_le(self.roll_ailerons);
15991        __tmp.put_f32_le(self.pitch_elevator);
15992        __tmp.put_f32_le(self.yaw_rudder);
15993        __tmp.put_f32_le(self.throttle);
15994        __tmp.put_f32_le(self.aux1);
15995        __tmp.put_f32_le(self.aux2);
15996        __tmp.put_f32_le(self.aux3);
15997        __tmp.put_f32_le(self.aux4);
15998        __tmp.put_u8(self.mode as u8);
15999        __tmp.put_u8(self.nav_mode);
16000        if matches!(version, MavlinkVersion::V2) {
16001            let len = __tmp.len();
16002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16003        } else {
16004            __tmp.len()
16005        }
16006    }
16007}
16008#[doc = "id: 113"]
16009#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16010#[derive(Debug, Clone, PartialEq)]
16011#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16013pub struct HIL_GPS_DATA {
16014    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16015    pub time_usec: u64,
16016    #[doc = "Latitude (WGS84)"]
16017    pub lat: i32,
16018    #[doc = "Longitude (WGS84)"]
16019    pub lon: i32,
16020    #[doc = "Altitude (MSL). Positive for up."]
16021    pub alt: i32,
16022    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16023    pub eph: u16,
16024    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16025    pub epv: u16,
16026    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16027    pub vel: u16,
16028    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16029    pub vn: i16,
16030    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16031    pub ve: i16,
16032    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16033    pub vd: i16,
16034    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16035    pub cog: u16,
16036    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16037    pub fix_type: u8,
16038    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16039    pub satellites_visible: u8,
16040    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16041    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16042    pub id: u8,
16043    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16044    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16045    pub yaw: u16,
16046}
16047impl HIL_GPS_DATA {
16048    pub const ENCODED_LEN: usize = 39usize;
16049    pub const DEFAULT: Self = Self {
16050        time_usec: 0_u64,
16051        lat: 0_i32,
16052        lon: 0_i32,
16053        alt: 0_i32,
16054        eph: 0_u16,
16055        epv: 0_u16,
16056        vel: 0_u16,
16057        vn: 0_i16,
16058        ve: 0_i16,
16059        vd: 0_i16,
16060        cog: 0_u16,
16061        fix_type: 0_u8,
16062        satellites_visible: 0_u8,
16063        id: 0_u8,
16064        yaw: 0_u16,
16065    };
16066    #[cfg(feature = "arbitrary")]
16067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16068        use arbitrary::{Arbitrary, Unstructured};
16069        let mut buf = [0u8; 1024];
16070        rng.fill_bytes(&mut buf);
16071        let mut unstructured = Unstructured::new(&buf);
16072        Self::arbitrary(&mut unstructured).unwrap_or_default()
16073    }
16074}
16075impl Default for HIL_GPS_DATA {
16076    fn default() -> Self {
16077        Self::DEFAULT.clone()
16078    }
16079}
16080impl MessageData for HIL_GPS_DATA {
16081    type Message = MavMessage;
16082    const ID: u32 = 113u32;
16083    const NAME: &'static str = "HIL_GPS";
16084    const EXTRA_CRC: u8 = 124u8;
16085    const ENCODED_LEN: usize = 39usize;
16086    fn deser(
16087        _version: MavlinkVersion,
16088        __input: &[u8],
16089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16090        let avail_len = __input.len();
16091        let mut payload_buf = [0; Self::ENCODED_LEN];
16092        let mut buf = if avail_len < Self::ENCODED_LEN {
16093            payload_buf[0..avail_len].copy_from_slice(__input);
16094            Bytes::new(&payload_buf)
16095        } else {
16096            Bytes::new(__input)
16097        };
16098        let mut __struct = Self::default();
16099        __struct.time_usec = buf.get_u64_le();
16100        __struct.lat = buf.get_i32_le();
16101        __struct.lon = buf.get_i32_le();
16102        __struct.alt = buf.get_i32_le();
16103        __struct.eph = buf.get_u16_le();
16104        __struct.epv = buf.get_u16_le();
16105        __struct.vel = buf.get_u16_le();
16106        __struct.vn = buf.get_i16_le();
16107        __struct.ve = buf.get_i16_le();
16108        __struct.vd = buf.get_i16_le();
16109        __struct.cog = buf.get_u16_le();
16110        __struct.fix_type = buf.get_u8();
16111        __struct.satellites_visible = buf.get_u8();
16112        __struct.id = buf.get_u8();
16113        __struct.yaw = buf.get_u16_le();
16114        Ok(__struct)
16115    }
16116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16117        let mut __tmp = BytesMut::new(bytes);
16118        #[allow(clippy::absurd_extreme_comparisons)]
16119        #[allow(unused_comparisons)]
16120        if __tmp.remaining() < Self::ENCODED_LEN {
16121            panic!(
16122                "buffer is too small (need {} bytes, but got {})",
16123                Self::ENCODED_LEN,
16124                __tmp.remaining(),
16125            )
16126        }
16127        __tmp.put_u64_le(self.time_usec);
16128        __tmp.put_i32_le(self.lat);
16129        __tmp.put_i32_le(self.lon);
16130        __tmp.put_i32_le(self.alt);
16131        __tmp.put_u16_le(self.eph);
16132        __tmp.put_u16_le(self.epv);
16133        __tmp.put_u16_le(self.vel);
16134        __tmp.put_i16_le(self.vn);
16135        __tmp.put_i16_le(self.ve);
16136        __tmp.put_i16_le(self.vd);
16137        __tmp.put_u16_le(self.cog);
16138        __tmp.put_u8(self.fix_type);
16139        __tmp.put_u8(self.satellites_visible);
16140        __tmp.put_u8(self.id);
16141        __tmp.put_u16_le(self.yaw);
16142        if matches!(version, MavlinkVersion::V2) {
16143            let len = __tmp.len();
16144            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16145        } else {
16146            __tmp.len()
16147        }
16148    }
16149}
16150#[doc = "id: 114"]
16151#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16152#[derive(Debug, Clone, PartialEq)]
16153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16155pub struct HIL_OPTICAL_FLOW_DATA {
16156    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16157    pub time_usec: u64,
16158    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16159    pub integration_time_us: u32,
16160    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16161    pub integrated_x: f32,
16162    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16163    pub integrated_y: f32,
16164    #[doc = "RH rotation around X axis"]
16165    pub integrated_xgyro: f32,
16166    #[doc = "RH rotation around Y axis"]
16167    pub integrated_ygyro: f32,
16168    #[doc = "RH rotation around Z axis"]
16169    pub integrated_zgyro: f32,
16170    #[doc = "Time since the distance was sampled."]
16171    pub time_delta_distance_us: u32,
16172    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16173    pub distance: f32,
16174    #[doc = "Temperature"]
16175    pub temperature: i16,
16176    #[doc = "Sensor ID"]
16177    pub sensor_id: u8,
16178    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16179    pub quality: u8,
16180}
16181impl HIL_OPTICAL_FLOW_DATA {
16182    pub const ENCODED_LEN: usize = 44usize;
16183    pub const DEFAULT: Self = Self {
16184        time_usec: 0_u64,
16185        integration_time_us: 0_u32,
16186        integrated_x: 0.0_f32,
16187        integrated_y: 0.0_f32,
16188        integrated_xgyro: 0.0_f32,
16189        integrated_ygyro: 0.0_f32,
16190        integrated_zgyro: 0.0_f32,
16191        time_delta_distance_us: 0_u32,
16192        distance: 0.0_f32,
16193        temperature: 0_i16,
16194        sensor_id: 0_u8,
16195        quality: 0_u8,
16196    };
16197    #[cfg(feature = "arbitrary")]
16198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16199        use arbitrary::{Arbitrary, Unstructured};
16200        let mut buf = [0u8; 1024];
16201        rng.fill_bytes(&mut buf);
16202        let mut unstructured = Unstructured::new(&buf);
16203        Self::arbitrary(&mut unstructured).unwrap_or_default()
16204    }
16205}
16206impl Default for HIL_OPTICAL_FLOW_DATA {
16207    fn default() -> Self {
16208        Self::DEFAULT.clone()
16209    }
16210}
16211impl MessageData for HIL_OPTICAL_FLOW_DATA {
16212    type Message = MavMessage;
16213    const ID: u32 = 114u32;
16214    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16215    const EXTRA_CRC: u8 = 237u8;
16216    const ENCODED_LEN: usize = 44usize;
16217    fn deser(
16218        _version: MavlinkVersion,
16219        __input: &[u8],
16220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16221        let avail_len = __input.len();
16222        let mut payload_buf = [0; Self::ENCODED_LEN];
16223        let mut buf = if avail_len < Self::ENCODED_LEN {
16224            payload_buf[0..avail_len].copy_from_slice(__input);
16225            Bytes::new(&payload_buf)
16226        } else {
16227            Bytes::new(__input)
16228        };
16229        let mut __struct = Self::default();
16230        __struct.time_usec = buf.get_u64_le();
16231        __struct.integration_time_us = buf.get_u32_le();
16232        __struct.integrated_x = buf.get_f32_le();
16233        __struct.integrated_y = buf.get_f32_le();
16234        __struct.integrated_xgyro = buf.get_f32_le();
16235        __struct.integrated_ygyro = buf.get_f32_le();
16236        __struct.integrated_zgyro = buf.get_f32_le();
16237        __struct.time_delta_distance_us = buf.get_u32_le();
16238        __struct.distance = buf.get_f32_le();
16239        __struct.temperature = buf.get_i16_le();
16240        __struct.sensor_id = buf.get_u8();
16241        __struct.quality = buf.get_u8();
16242        Ok(__struct)
16243    }
16244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16245        let mut __tmp = BytesMut::new(bytes);
16246        #[allow(clippy::absurd_extreme_comparisons)]
16247        #[allow(unused_comparisons)]
16248        if __tmp.remaining() < Self::ENCODED_LEN {
16249            panic!(
16250                "buffer is too small (need {} bytes, but got {})",
16251                Self::ENCODED_LEN,
16252                __tmp.remaining(),
16253            )
16254        }
16255        __tmp.put_u64_le(self.time_usec);
16256        __tmp.put_u32_le(self.integration_time_us);
16257        __tmp.put_f32_le(self.integrated_x);
16258        __tmp.put_f32_le(self.integrated_y);
16259        __tmp.put_f32_le(self.integrated_xgyro);
16260        __tmp.put_f32_le(self.integrated_ygyro);
16261        __tmp.put_f32_le(self.integrated_zgyro);
16262        __tmp.put_u32_le(self.time_delta_distance_us);
16263        __tmp.put_f32_le(self.distance);
16264        __tmp.put_i16_le(self.temperature);
16265        __tmp.put_u8(self.sensor_id);
16266        __tmp.put_u8(self.quality);
16267        if matches!(version, MavlinkVersion::V2) {
16268            let len = __tmp.len();
16269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16270        } else {
16271            __tmp.len()
16272        }
16273    }
16274}
16275#[doc = "id: 92"]
16276#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16277#[derive(Debug, Clone, PartialEq)]
16278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16280pub struct HIL_RC_INPUTS_RAW_DATA {
16281    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16282    pub time_usec: u64,
16283    #[doc = "RC channel 1 value"]
16284    pub chan1_raw: u16,
16285    #[doc = "RC channel 2 value"]
16286    pub chan2_raw: u16,
16287    #[doc = "RC channel 3 value"]
16288    pub chan3_raw: u16,
16289    #[doc = "RC channel 4 value"]
16290    pub chan4_raw: u16,
16291    #[doc = "RC channel 5 value"]
16292    pub chan5_raw: u16,
16293    #[doc = "RC channel 6 value"]
16294    pub chan6_raw: u16,
16295    #[doc = "RC channel 7 value"]
16296    pub chan7_raw: u16,
16297    #[doc = "RC channel 8 value"]
16298    pub chan8_raw: u16,
16299    #[doc = "RC channel 9 value"]
16300    pub chan9_raw: u16,
16301    #[doc = "RC channel 10 value"]
16302    pub chan10_raw: u16,
16303    #[doc = "RC channel 11 value"]
16304    pub chan11_raw: u16,
16305    #[doc = "RC channel 12 value"]
16306    pub chan12_raw: u16,
16307    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16308    pub rssi: u8,
16309}
16310impl HIL_RC_INPUTS_RAW_DATA {
16311    pub const ENCODED_LEN: usize = 33usize;
16312    pub const DEFAULT: Self = Self {
16313        time_usec: 0_u64,
16314        chan1_raw: 0_u16,
16315        chan2_raw: 0_u16,
16316        chan3_raw: 0_u16,
16317        chan4_raw: 0_u16,
16318        chan5_raw: 0_u16,
16319        chan6_raw: 0_u16,
16320        chan7_raw: 0_u16,
16321        chan8_raw: 0_u16,
16322        chan9_raw: 0_u16,
16323        chan10_raw: 0_u16,
16324        chan11_raw: 0_u16,
16325        chan12_raw: 0_u16,
16326        rssi: 0_u8,
16327    };
16328    #[cfg(feature = "arbitrary")]
16329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16330        use arbitrary::{Arbitrary, Unstructured};
16331        let mut buf = [0u8; 1024];
16332        rng.fill_bytes(&mut buf);
16333        let mut unstructured = Unstructured::new(&buf);
16334        Self::arbitrary(&mut unstructured).unwrap_or_default()
16335    }
16336}
16337impl Default for HIL_RC_INPUTS_RAW_DATA {
16338    fn default() -> Self {
16339        Self::DEFAULT.clone()
16340    }
16341}
16342impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16343    type Message = MavMessage;
16344    const ID: u32 = 92u32;
16345    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16346    const EXTRA_CRC: u8 = 54u8;
16347    const ENCODED_LEN: usize = 33usize;
16348    fn deser(
16349        _version: MavlinkVersion,
16350        __input: &[u8],
16351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16352        let avail_len = __input.len();
16353        let mut payload_buf = [0; Self::ENCODED_LEN];
16354        let mut buf = if avail_len < Self::ENCODED_LEN {
16355            payload_buf[0..avail_len].copy_from_slice(__input);
16356            Bytes::new(&payload_buf)
16357        } else {
16358            Bytes::new(__input)
16359        };
16360        let mut __struct = Self::default();
16361        __struct.time_usec = buf.get_u64_le();
16362        __struct.chan1_raw = buf.get_u16_le();
16363        __struct.chan2_raw = buf.get_u16_le();
16364        __struct.chan3_raw = buf.get_u16_le();
16365        __struct.chan4_raw = buf.get_u16_le();
16366        __struct.chan5_raw = buf.get_u16_le();
16367        __struct.chan6_raw = buf.get_u16_le();
16368        __struct.chan7_raw = buf.get_u16_le();
16369        __struct.chan8_raw = buf.get_u16_le();
16370        __struct.chan9_raw = buf.get_u16_le();
16371        __struct.chan10_raw = buf.get_u16_le();
16372        __struct.chan11_raw = buf.get_u16_le();
16373        __struct.chan12_raw = buf.get_u16_le();
16374        __struct.rssi = buf.get_u8();
16375        Ok(__struct)
16376    }
16377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16378        let mut __tmp = BytesMut::new(bytes);
16379        #[allow(clippy::absurd_extreme_comparisons)]
16380        #[allow(unused_comparisons)]
16381        if __tmp.remaining() < Self::ENCODED_LEN {
16382            panic!(
16383                "buffer is too small (need {} bytes, but got {})",
16384                Self::ENCODED_LEN,
16385                __tmp.remaining(),
16386            )
16387        }
16388        __tmp.put_u64_le(self.time_usec);
16389        __tmp.put_u16_le(self.chan1_raw);
16390        __tmp.put_u16_le(self.chan2_raw);
16391        __tmp.put_u16_le(self.chan3_raw);
16392        __tmp.put_u16_le(self.chan4_raw);
16393        __tmp.put_u16_le(self.chan5_raw);
16394        __tmp.put_u16_le(self.chan6_raw);
16395        __tmp.put_u16_le(self.chan7_raw);
16396        __tmp.put_u16_le(self.chan8_raw);
16397        __tmp.put_u16_le(self.chan9_raw);
16398        __tmp.put_u16_le(self.chan10_raw);
16399        __tmp.put_u16_le(self.chan11_raw);
16400        __tmp.put_u16_le(self.chan12_raw);
16401        __tmp.put_u8(self.rssi);
16402        if matches!(version, MavlinkVersion::V2) {
16403            let len = __tmp.len();
16404            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16405        } else {
16406            __tmp.len()
16407        }
16408    }
16409}
16410#[doc = "id: 107"]
16411#[doc = "The IMU readings in SI units in NED body frame."]
16412#[derive(Debug, Clone, PartialEq)]
16413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16415pub struct HIL_SENSOR_DATA {
16416    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16417    pub time_usec: u64,
16418    #[doc = "X acceleration"]
16419    pub xacc: f32,
16420    #[doc = "Y acceleration"]
16421    pub yacc: f32,
16422    #[doc = "Z acceleration"]
16423    pub zacc: f32,
16424    #[doc = "Angular speed around X axis in body frame"]
16425    pub xgyro: f32,
16426    #[doc = "Angular speed around Y axis in body frame"]
16427    pub ygyro: f32,
16428    #[doc = "Angular speed around Z axis in body frame"]
16429    pub zgyro: f32,
16430    #[doc = "X Magnetic field"]
16431    pub xmag: f32,
16432    #[doc = "Y Magnetic field"]
16433    pub ymag: f32,
16434    #[doc = "Z Magnetic field"]
16435    pub zmag: f32,
16436    #[doc = "Absolute pressure"]
16437    pub abs_pressure: f32,
16438    #[doc = "Differential pressure (airspeed)"]
16439    pub diff_pressure: f32,
16440    #[doc = "Altitude calculated from pressure"]
16441    pub pressure_alt: f32,
16442    #[doc = "Temperature"]
16443    pub temperature: f32,
16444    #[doc = "Bitmap for fields that have updated since last message"]
16445    pub fields_updated: HilSensorUpdatedFlags,
16446    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16447    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16448    pub id: u8,
16449}
16450impl HIL_SENSOR_DATA {
16451    pub const ENCODED_LEN: usize = 65usize;
16452    pub const DEFAULT: Self = Self {
16453        time_usec: 0_u64,
16454        xacc: 0.0_f32,
16455        yacc: 0.0_f32,
16456        zacc: 0.0_f32,
16457        xgyro: 0.0_f32,
16458        ygyro: 0.0_f32,
16459        zgyro: 0.0_f32,
16460        xmag: 0.0_f32,
16461        ymag: 0.0_f32,
16462        zmag: 0.0_f32,
16463        abs_pressure: 0.0_f32,
16464        diff_pressure: 0.0_f32,
16465        pressure_alt: 0.0_f32,
16466        temperature: 0.0_f32,
16467        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16468        id: 0_u8,
16469    };
16470    #[cfg(feature = "arbitrary")]
16471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16472        use arbitrary::{Arbitrary, Unstructured};
16473        let mut buf = [0u8; 1024];
16474        rng.fill_bytes(&mut buf);
16475        let mut unstructured = Unstructured::new(&buf);
16476        Self::arbitrary(&mut unstructured).unwrap_or_default()
16477    }
16478}
16479impl Default for HIL_SENSOR_DATA {
16480    fn default() -> Self {
16481        Self::DEFAULT.clone()
16482    }
16483}
16484impl MessageData for HIL_SENSOR_DATA {
16485    type Message = MavMessage;
16486    const ID: u32 = 107u32;
16487    const NAME: &'static str = "HIL_SENSOR";
16488    const EXTRA_CRC: u8 = 108u8;
16489    const ENCODED_LEN: usize = 65usize;
16490    fn deser(
16491        _version: MavlinkVersion,
16492        __input: &[u8],
16493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16494        let avail_len = __input.len();
16495        let mut payload_buf = [0; Self::ENCODED_LEN];
16496        let mut buf = if avail_len < Self::ENCODED_LEN {
16497            payload_buf[0..avail_len].copy_from_slice(__input);
16498            Bytes::new(&payload_buf)
16499        } else {
16500            Bytes::new(__input)
16501        };
16502        let mut __struct = Self::default();
16503        __struct.time_usec = buf.get_u64_le();
16504        __struct.xacc = buf.get_f32_le();
16505        __struct.yacc = buf.get_f32_le();
16506        __struct.zacc = buf.get_f32_le();
16507        __struct.xgyro = buf.get_f32_le();
16508        __struct.ygyro = buf.get_f32_le();
16509        __struct.zgyro = buf.get_f32_le();
16510        __struct.xmag = buf.get_f32_le();
16511        __struct.ymag = buf.get_f32_le();
16512        __struct.zmag = buf.get_f32_le();
16513        __struct.abs_pressure = buf.get_f32_le();
16514        __struct.diff_pressure = buf.get_f32_le();
16515        __struct.pressure_alt = buf.get_f32_le();
16516        __struct.temperature = buf.get_f32_le();
16517        let tmp = buf.get_u32_le();
16518        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16519            tmp & HilSensorUpdatedFlags::all().bits(),
16520        )
16521        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16522            flag_type: "HilSensorUpdatedFlags",
16523            value: tmp as u32,
16524        })?;
16525        __struct.id = buf.get_u8();
16526        Ok(__struct)
16527    }
16528    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16529        let mut __tmp = BytesMut::new(bytes);
16530        #[allow(clippy::absurd_extreme_comparisons)]
16531        #[allow(unused_comparisons)]
16532        if __tmp.remaining() < Self::ENCODED_LEN {
16533            panic!(
16534                "buffer is too small (need {} bytes, but got {})",
16535                Self::ENCODED_LEN,
16536                __tmp.remaining(),
16537            )
16538        }
16539        __tmp.put_u64_le(self.time_usec);
16540        __tmp.put_f32_le(self.xacc);
16541        __tmp.put_f32_le(self.yacc);
16542        __tmp.put_f32_le(self.zacc);
16543        __tmp.put_f32_le(self.xgyro);
16544        __tmp.put_f32_le(self.ygyro);
16545        __tmp.put_f32_le(self.zgyro);
16546        __tmp.put_f32_le(self.xmag);
16547        __tmp.put_f32_le(self.ymag);
16548        __tmp.put_f32_le(self.zmag);
16549        __tmp.put_f32_le(self.abs_pressure);
16550        __tmp.put_f32_le(self.diff_pressure);
16551        __tmp.put_f32_le(self.pressure_alt);
16552        __tmp.put_f32_le(self.temperature);
16553        __tmp.put_u32_le(self.fields_updated.bits());
16554        __tmp.put_u8(self.id);
16555        if matches!(version, MavlinkVersion::V2) {
16556            let len = __tmp.len();
16557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16558        } else {
16559            __tmp.len()
16560        }
16561    }
16562}
16563#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16564#[doc = "id: 90"]
16565#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16566#[derive(Debug, Clone, PartialEq)]
16567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16569pub struct HIL_STATE_DATA {
16570    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16571    pub time_usec: u64,
16572    #[doc = "Roll angle"]
16573    pub roll: f32,
16574    #[doc = "Pitch angle"]
16575    pub pitch: f32,
16576    #[doc = "Yaw angle"]
16577    pub yaw: f32,
16578    #[doc = "Body frame roll / phi angular speed"]
16579    pub rollspeed: f32,
16580    #[doc = "Body frame pitch / theta angular speed"]
16581    pub pitchspeed: f32,
16582    #[doc = "Body frame yaw / psi angular speed"]
16583    pub yawspeed: f32,
16584    #[doc = "Latitude"]
16585    pub lat: i32,
16586    #[doc = "Longitude"]
16587    pub lon: i32,
16588    #[doc = "Altitude"]
16589    pub alt: i32,
16590    #[doc = "Ground X Speed (Latitude)"]
16591    pub vx: i16,
16592    #[doc = "Ground Y Speed (Longitude)"]
16593    pub vy: i16,
16594    #[doc = "Ground Z Speed (Altitude)"]
16595    pub vz: i16,
16596    #[doc = "X acceleration"]
16597    pub xacc: i16,
16598    #[doc = "Y acceleration"]
16599    pub yacc: i16,
16600    #[doc = "Z acceleration"]
16601    pub zacc: i16,
16602}
16603impl HIL_STATE_DATA {
16604    pub const ENCODED_LEN: usize = 56usize;
16605    pub const DEFAULT: Self = Self {
16606        time_usec: 0_u64,
16607        roll: 0.0_f32,
16608        pitch: 0.0_f32,
16609        yaw: 0.0_f32,
16610        rollspeed: 0.0_f32,
16611        pitchspeed: 0.0_f32,
16612        yawspeed: 0.0_f32,
16613        lat: 0_i32,
16614        lon: 0_i32,
16615        alt: 0_i32,
16616        vx: 0_i16,
16617        vy: 0_i16,
16618        vz: 0_i16,
16619        xacc: 0_i16,
16620        yacc: 0_i16,
16621        zacc: 0_i16,
16622    };
16623    #[cfg(feature = "arbitrary")]
16624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16625        use arbitrary::{Arbitrary, Unstructured};
16626        let mut buf = [0u8; 1024];
16627        rng.fill_bytes(&mut buf);
16628        let mut unstructured = Unstructured::new(&buf);
16629        Self::arbitrary(&mut unstructured).unwrap_or_default()
16630    }
16631}
16632impl Default for HIL_STATE_DATA {
16633    fn default() -> Self {
16634        Self::DEFAULT.clone()
16635    }
16636}
16637impl MessageData for HIL_STATE_DATA {
16638    type Message = MavMessage;
16639    const ID: u32 = 90u32;
16640    const NAME: &'static str = "HIL_STATE";
16641    const EXTRA_CRC: u8 = 183u8;
16642    const ENCODED_LEN: usize = 56usize;
16643    fn deser(
16644        _version: MavlinkVersion,
16645        __input: &[u8],
16646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16647        let avail_len = __input.len();
16648        let mut payload_buf = [0; Self::ENCODED_LEN];
16649        let mut buf = if avail_len < Self::ENCODED_LEN {
16650            payload_buf[0..avail_len].copy_from_slice(__input);
16651            Bytes::new(&payload_buf)
16652        } else {
16653            Bytes::new(__input)
16654        };
16655        let mut __struct = Self::default();
16656        __struct.time_usec = buf.get_u64_le();
16657        __struct.roll = buf.get_f32_le();
16658        __struct.pitch = buf.get_f32_le();
16659        __struct.yaw = buf.get_f32_le();
16660        __struct.rollspeed = buf.get_f32_le();
16661        __struct.pitchspeed = buf.get_f32_le();
16662        __struct.yawspeed = buf.get_f32_le();
16663        __struct.lat = buf.get_i32_le();
16664        __struct.lon = buf.get_i32_le();
16665        __struct.alt = buf.get_i32_le();
16666        __struct.vx = buf.get_i16_le();
16667        __struct.vy = buf.get_i16_le();
16668        __struct.vz = buf.get_i16_le();
16669        __struct.xacc = buf.get_i16_le();
16670        __struct.yacc = buf.get_i16_le();
16671        __struct.zacc = buf.get_i16_le();
16672        Ok(__struct)
16673    }
16674    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16675        let mut __tmp = BytesMut::new(bytes);
16676        #[allow(clippy::absurd_extreme_comparisons)]
16677        #[allow(unused_comparisons)]
16678        if __tmp.remaining() < Self::ENCODED_LEN {
16679            panic!(
16680                "buffer is too small (need {} bytes, but got {})",
16681                Self::ENCODED_LEN,
16682                __tmp.remaining(),
16683            )
16684        }
16685        __tmp.put_u64_le(self.time_usec);
16686        __tmp.put_f32_le(self.roll);
16687        __tmp.put_f32_le(self.pitch);
16688        __tmp.put_f32_le(self.yaw);
16689        __tmp.put_f32_le(self.rollspeed);
16690        __tmp.put_f32_le(self.pitchspeed);
16691        __tmp.put_f32_le(self.yawspeed);
16692        __tmp.put_i32_le(self.lat);
16693        __tmp.put_i32_le(self.lon);
16694        __tmp.put_i32_le(self.alt);
16695        __tmp.put_i16_le(self.vx);
16696        __tmp.put_i16_le(self.vy);
16697        __tmp.put_i16_le(self.vz);
16698        __tmp.put_i16_le(self.xacc);
16699        __tmp.put_i16_le(self.yacc);
16700        __tmp.put_i16_le(self.zacc);
16701        if matches!(version, MavlinkVersion::V2) {
16702            let len = __tmp.len();
16703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16704        } else {
16705            __tmp.len()
16706        }
16707    }
16708}
16709#[doc = "id: 115"]
16710#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16711#[derive(Debug, Clone, PartialEq)]
16712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16714pub struct HIL_STATE_QUATERNION_DATA {
16715    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16716    pub time_usec: u64,
16717    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16718    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16719    pub attitude_quaternion: [f32; 4],
16720    #[doc = "Body frame roll / phi angular speed"]
16721    pub rollspeed: f32,
16722    #[doc = "Body frame pitch / theta angular speed"]
16723    pub pitchspeed: f32,
16724    #[doc = "Body frame yaw / psi angular speed"]
16725    pub yawspeed: f32,
16726    #[doc = "Latitude"]
16727    pub lat: i32,
16728    #[doc = "Longitude"]
16729    pub lon: i32,
16730    #[doc = "Altitude"]
16731    pub alt: i32,
16732    #[doc = "Ground X Speed (Latitude)"]
16733    pub vx: i16,
16734    #[doc = "Ground Y Speed (Longitude)"]
16735    pub vy: i16,
16736    #[doc = "Ground Z Speed (Altitude)"]
16737    pub vz: i16,
16738    #[doc = "Indicated airspeed"]
16739    pub ind_airspeed: u16,
16740    #[doc = "True airspeed"]
16741    pub true_airspeed: u16,
16742    #[doc = "X acceleration"]
16743    pub xacc: i16,
16744    #[doc = "Y acceleration"]
16745    pub yacc: i16,
16746    #[doc = "Z acceleration"]
16747    pub zacc: i16,
16748}
16749impl HIL_STATE_QUATERNION_DATA {
16750    pub const ENCODED_LEN: usize = 64usize;
16751    pub const DEFAULT: Self = Self {
16752        time_usec: 0_u64,
16753        attitude_quaternion: [0.0_f32; 4usize],
16754        rollspeed: 0.0_f32,
16755        pitchspeed: 0.0_f32,
16756        yawspeed: 0.0_f32,
16757        lat: 0_i32,
16758        lon: 0_i32,
16759        alt: 0_i32,
16760        vx: 0_i16,
16761        vy: 0_i16,
16762        vz: 0_i16,
16763        ind_airspeed: 0_u16,
16764        true_airspeed: 0_u16,
16765        xacc: 0_i16,
16766        yacc: 0_i16,
16767        zacc: 0_i16,
16768    };
16769    #[cfg(feature = "arbitrary")]
16770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16771        use arbitrary::{Arbitrary, Unstructured};
16772        let mut buf = [0u8; 1024];
16773        rng.fill_bytes(&mut buf);
16774        let mut unstructured = Unstructured::new(&buf);
16775        Self::arbitrary(&mut unstructured).unwrap_or_default()
16776    }
16777}
16778impl Default for HIL_STATE_QUATERNION_DATA {
16779    fn default() -> Self {
16780        Self::DEFAULT.clone()
16781    }
16782}
16783impl MessageData for HIL_STATE_QUATERNION_DATA {
16784    type Message = MavMessage;
16785    const ID: u32 = 115u32;
16786    const NAME: &'static str = "HIL_STATE_QUATERNION";
16787    const EXTRA_CRC: u8 = 4u8;
16788    const ENCODED_LEN: usize = 64usize;
16789    fn deser(
16790        _version: MavlinkVersion,
16791        __input: &[u8],
16792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16793        let avail_len = __input.len();
16794        let mut payload_buf = [0; Self::ENCODED_LEN];
16795        let mut buf = if avail_len < Self::ENCODED_LEN {
16796            payload_buf[0..avail_len].copy_from_slice(__input);
16797            Bytes::new(&payload_buf)
16798        } else {
16799            Bytes::new(__input)
16800        };
16801        let mut __struct = Self::default();
16802        __struct.time_usec = buf.get_u64_le();
16803        for v in &mut __struct.attitude_quaternion {
16804            let val = buf.get_f32_le();
16805            *v = val;
16806        }
16807        __struct.rollspeed = buf.get_f32_le();
16808        __struct.pitchspeed = buf.get_f32_le();
16809        __struct.yawspeed = buf.get_f32_le();
16810        __struct.lat = buf.get_i32_le();
16811        __struct.lon = buf.get_i32_le();
16812        __struct.alt = buf.get_i32_le();
16813        __struct.vx = buf.get_i16_le();
16814        __struct.vy = buf.get_i16_le();
16815        __struct.vz = buf.get_i16_le();
16816        __struct.ind_airspeed = buf.get_u16_le();
16817        __struct.true_airspeed = buf.get_u16_le();
16818        __struct.xacc = buf.get_i16_le();
16819        __struct.yacc = buf.get_i16_le();
16820        __struct.zacc = buf.get_i16_le();
16821        Ok(__struct)
16822    }
16823    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16824        let mut __tmp = BytesMut::new(bytes);
16825        #[allow(clippy::absurd_extreme_comparisons)]
16826        #[allow(unused_comparisons)]
16827        if __tmp.remaining() < Self::ENCODED_LEN {
16828            panic!(
16829                "buffer is too small (need {} bytes, but got {})",
16830                Self::ENCODED_LEN,
16831                __tmp.remaining(),
16832            )
16833        }
16834        __tmp.put_u64_le(self.time_usec);
16835        for val in &self.attitude_quaternion {
16836            __tmp.put_f32_le(*val);
16837        }
16838        __tmp.put_f32_le(self.rollspeed);
16839        __tmp.put_f32_le(self.pitchspeed);
16840        __tmp.put_f32_le(self.yawspeed);
16841        __tmp.put_i32_le(self.lat);
16842        __tmp.put_i32_le(self.lon);
16843        __tmp.put_i32_le(self.alt);
16844        __tmp.put_i16_le(self.vx);
16845        __tmp.put_i16_le(self.vy);
16846        __tmp.put_i16_le(self.vz);
16847        __tmp.put_u16_le(self.ind_airspeed);
16848        __tmp.put_u16_le(self.true_airspeed);
16849        __tmp.put_i16_le(self.xacc);
16850        __tmp.put_i16_le(self.yacc);
16851        __tmp.put_i16_le(self.zacc);
16852        if matches!(version, MavlinkVersion::V2) {
16853            let len = __tmp.len();
16854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16855        } else {
16856            __tmp.len()
16857        }
16858    }
16859}
16860#[doc = "id: 242"]
16861#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16862#[derive(Debug, Clone, PartialEq)]
16863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16865pub struct HOME_POSITION_DATA {
16866    #[doc = "Latitude (WGS84)"]
16867    pub latitude: i32,
16868    #[doc = "Longitude (WGS84)"]
16869    pub longitude: i32,
16870    #[doc = "Altitude (MSL). Positive for up."]
16871    pub altitude: i32,
16872    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16873    pub x: f32,
16874    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16875    pub y: f32,
16876    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16877    pub z: f32,
16878    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16879    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16880    pub q: [f32; 4],
16881    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16882    pub approach_x: f32,
16883    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16884    pub approach_y: f32,
16885    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16886    pub approach_z: f32,
16887    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16888    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16889    pub time_usec: u64,
16890}
16891impl HOME_POSITION_DATA {
16892    pub const ENCODED_LEN: usize = 60usize;
16893    pub const DEFAULT: Self = Self {
16894        latitude: 0_i32,
16895        longitude: 0_i32,
16896        altitude: 0_i32,
16897        x: 0.0_f32,
16898        y: 0.0_f32,
16899        z: 0.0_f32,
16900        q: [0.0_f32; 4usize],
16901        approach_x: 0.0_f32,
16902        approach_y: 0.0_f32,
16903        approach_z: 0.0_f32,
16904        time_usec: 0_u64,
16905    };
16906    #[cfg(feature = "arbitrary")]
16907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16908        use arbitrary::{Arbitrary, Unstructured};
16909        let mut buf = [0u8; 1024];
16910        rng.fill_bytes(&mut buf);
16911        let mut unstructured = Unstructured::new(&buf);
16912        Self::arbitrary(&mut unstructured).unwrap_or_default()
16913    }
16914}
16915impl Default for HOME_POSITION_DATA {
16916    fn default() -> Self {
16917        Self::DEFAULT.clone()
16918    }
16919}
16920impl MessageData for HOME_POSITION_DATA {
16921    type Message = MavMessage;
16922    const ID: u32 = 242u32;
16923    const NAME: &'static str = "HOME_POSITION";
16924    const EXTRA_CRC: u8 = 104u8;
16925    const ENCODED_LEN: usize = 60usize;
16926    fn deser(
16927        _version: MavlinkVersion,
16928        __input: &[u8],
16929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16930        let avail_len = __input.len();
16931        let mut payload_buf = [0; Self::ENCODED_LEN];
16932        let mut buf = if avail_len < Self::ENCODED_LEN {
16933            payload_buf[0..avail_len].copy_from_slice(__input);
16934            Bytes::new(&payload_buf)
16935        } else {
16936            Bytes::new(__input)
16937        };
16938        let mut __struct = Self::default();
16939        __struct.latitude = buf.get_i32_le();
16940        __struct.longitude = buf.get_i32_le();
16941        __struct.altitude = buf.get_i32_le();
16942        __struct.x = buf.get_f32_le();
16943        __struct.y = buf.get_f32_le();
16944        __struct.z = buf.get_f32_le();
16945        for v in &mut __struct.q {
16946            let val = buf.get_f32_le();
16947            *v = val;
16948        }
16949        __struct.approach_x = buf.get_f32_le();
16950        __struct.approach_y = buf.get_f32_le();
16951        __struct.approach_z = buf.get_f32_le();
16952        __struct.time_usec = buf.get_u64_le();
16953        Ok(__struct)
16954    }
16955    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16956        let mut __tmp = BytesMut::new(bytes);
16957        #[allow(clippy::absurd_extreme_comparisons)]
16958        #[allow(unused_comparisons)]
16959        if __tmp.remaining() < Self::ENCODED_LEN {
16960            panic!(
16961                "buffer is too small (need {} bytes, but got {})",
16962                Self::ENCODED_LEN,
16963                __tmp.remaining(),
16964            )
16965        }
16966        __tmp.put_i32_le(self.latitude);
16967        __tmp.put_i32_le(self.longitude);
16968        __tmp.put_i32_le(self.altitude);
16969        __tmp.put_f32_le(self.x);
16970        __tmp.put_f32_le(self.y);
16971        __tmp.put_f32_le(self.z);
16972        for val in &self.q {
16973            __tmp.put_f32_le(*val);
16974        }
16975        __tmp.put_f32_le(self.approach_x);
16976        __tmp.put_f32_le(self.approach_y);
16977        __tmp.put_f32_le(self.approach_z);
16978        __tmp.put_u64_le(self.time_usec);
16979        if matches!(version, MavlinkVersion::V2) {
16980            let len = __tmp.len();
16981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16982        } else {
16983            __tmp.len()
16984        }
16985    }
16986}
16987#[doc = "id: 12920"]
16988#[doc = "Temperature and humidity from hygrometer."]
16989#[derive(Debug, Clone, PartialEq)]
16990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16992pub struct HYGROMETER_SENSOR_DATA {
16993    #[doc = "Temperature"]
16994    pub temperature: i16,
16995    #[doc = "Humidity"]
16996    pub humidity: u16,
16997    #[doc = "Hygrometer ID"]
16998    pub id: u8,
16999}
17000impl HYGROMETER_SENSOR_DATA {
17001    pub const ENCODED_LEN: usize = 5usize;
17002    pub const DEFAULT: Self = Self {
17003        temperature: 0_i16,
17004        humidity: 0_u16,
17005        id: 0_u8,
17006    };
17007    #[cfg(feature = "arbitrary")]
17008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17009        use arbitrary::{Arbitrary, Unstructured};
17010        let mut buf = [0u8; 1024];
17011        rng.fill_bytes(&mut buf);
17012        let mut unstructured = Unstructured::new(&buf);
17013        Self::arbitrary(&mut unstructured).unwrap_or_default()
17014    }
17015}
17016impl Default for HYGROMETER_SENSOR_DATA {
17017    fn default() -> Self {
17018        Self::DEFAULT.clone()
17019    }
17020}
17021impl MessageData for HYGROMETER_SENSOR_DATA {
17022    type Message = MavMessage;
17023    const ID: u32 = 12920u32;
17024    const NAME: &'static str = "HYGROMETER_SENSOR";
17025    const EXTRA_CRC: u8 = 20u8;
17026    const ENCODED_LEN: usize = 5usize;
17027    fn deser(
17028        _version: MavlinkVersion,
17029        __input: &[u8],
17030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17031        let avail_len = __input.len();
17032        let mut payload_buf = [0; Self::ENCODED_LEN];
17033        let mut buf = if avail_len < Self::ENCODED_LEN {
17034            payload_buf[0..avail_len].copy_from_slice(__input);
17035            Bytes::new(&payload_buf)
17036        } else {
17037            Bytes::new(__input)
17038        };
17039        let mut __struct = Self::default();
17040        __struct.temperature = buf.get_i16_le();
17041        __struct.humidity = buf.get_u16_le();
17042        __struct.id = buf.get_u8();
17043        Ok(__struct)
17044    }
17045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17046        let mut __tmp = BytesMut::new(bytes);
17047        #[allow(clippy::absurd_extreme_comparisons)]
17048        #[allow(unused_comparisons)]
17049        if __tmp.remaining() < Self::ENCODED_LEN {
17050            panic!(
17051                "buffer is too small (need {} bytes, but got {})",
17052                Self::ENCODED_LEN,
17053                __tmp.remaining(),
17054            )
17055        }
17056        __tmp.put_i16_le(self.temperature);
17057        __tmp.put_u16_le(self.humidity);
17058        __tmp.put_u8(self.id);
17059        if matches!(version, MavlinkVersion::V2) {
17060            let len = __tmp.len();
17061            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17062        } else {
17063            __tmp.len()
17064        }
17065    }
17066}
17067#[doc = "id: 440"]
17068#[doc = "Illuminator status."]
17069#[derive(Debug, Clone, PartialEq)]
17070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17072pub struct ILLUMINATOR_STATUS_DATA {
17073    #[doc = "Time since the start-up of the illuminator in ms"]
17074    pub uptime_ms: u32,
17075    #[doc = "Errors"]
17076    pub error_status: IlluminatorErrorFlags,
17077    #[doc = "Illuminator brightness"]
17078    pub brightness: f32,
17079    #[doc = "Illuminator strobing period in seconds"]
17080    pub strobe_period: f32,
17081    #[doc = "Illuminator strobing duty cycle"]
17082    pub strobe_duty_cycle: f32,
17083    #[doc = "Temperature in Celsius"]
17084    pub temp_c: f32,
17085    #[doc = "Minimum strobing period in seconds"]
17086    pub min_strobe_period: f32,
17087    #[doc = "Maximum strobing period in seconds"]
17088    pub max_strobe_period: f32,
17089    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17090    pub enable: u8,
17091    #[doc = "Supported illuminator modes"]
17092    pub mode_bitmask: IlluminatorMode,
17093    #[doc = "Illuminator mode"]
17094    pub mode: IlluminatorMode,
17095}
17096impl ILLUMINATOR_STATUS_DATA {
17097    pub const ENCODED_LEN: usize = 35usize;
17098    pub const DEFAULT: Self = Self {
17099        uptime_ms: 0_u32,
17100        error_status: IlluminatorErrorFlags::DEFAULT,
17101        brightness: 0.0_f32,
17102        strobe_period: 0.0_f32,
17103        strobe_duty_cycle: 0.0_f32,
17104        temp_c: 0.0_f32,
17105        min_strobe_period: 0.0_f32,
17106        max_strobe_period: 0.0_f32,
17107        enable: 0_u8,
17108        mode_bitmask: IlluminatorMode::DEFAULT,
17109        mode: IlluminatorMode::DEFAULT,
17110    };
17111    #[cfg(feature = "arbitrary")]
17112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17113        use arbitrary::{Arbitrary, Unstructured};
17114        let mut buf = [0u8; 1024];
17115        rng.fill_bytes(&mut buf);
17116        let mut unstructured = Unstructured::new(&buf);
17117        Self::arbitrary(&mut unstructured).unwrap_or_default()
17118    }
17119}
17120impl Default for ILLUMINATOR_STATUS_DATA {
17121    fn default() -> Self {
17122        Self::DEFAULT.clone()
17123    }
17124}
17125impl MessageData for ILLUMINATOR_STATUS_DATA {
17126    type Message = MavMessage;
17127    const ID: u32 = 440u32;
17128    const NAME: &'static str = "ILLUMINATOR_STATUS";
17129    const EXTRA_CRC: u8 = 66u8;
17130    const ENCODED_LEN: usize = 35usize;
17131    fn deser(
17132        _version: MavlinkVersion,
17133        __input: &[u8],
17134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17135        let avail_len = __input.len();
17136        let mut payload_buf = [0; Self::ENCODED_LEN];
17137        let mut buf = if avail_len < Self::ENCODED_LEN {
17138            payload_buf[0..avail_len].copy_from_slice(__input);
17139            Bytes::new(&payload_buf)
17140        } else {
17141            Bytes::new(__input)
17142        };
17143        let mut __struct = Self::default();
17144        __struct.uptime_ms = buf.get_u32_le();
17145        let tmp = buf.get_u32_le();
17146        __struct.error_status = IlluminatorErrorFlags::from_bits(
17147            tmp & IlluminatorErrorFlags::all().bits(),
17148        )
17149        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17150            flag_type: "IlluminatorErrorFlags",
17151            value: tmp as u32,
17152        })?;
17153        __struct.brightness = buf.get_f32_le();
17154        __struct.strobe_period = buf.get_f32_le();
17155        __struct.strobe_duty_cycle = buf.get_f32_le();
17156        __struct.temp_c = buf.get_f32_le();
17157        __struct.min_strobe_period = buf.get_f32_le();
17158        __struct.max_strobe_period = buf.get_f32_le();
17159        __struct.enable = buf.get_u8();
17160        let tmp = buf.get_u8();
17161        __struct.mode_bitmask =
17162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17163                enum_type: "IlluminatorMode",
17164                value: tmp as u32,
17165            })?;
17166        let tmp = buf.get_u8();
17167        __struct.mode =
17168            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17169                enum_type: "IlluminatorMode",
17170                value: tmp as u32,
17171            })?;
17172        Ok(__struct)
17173    }
17174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17175        let mut __tmp = BytesMut::new(bytes);
17176        #[allow(clippy::absurd_extreme_comparisons)]
17177        #[allow(unused_comparisons)]
17178        if __tmp.remaining() < Self::ENCODED_LEN {
17179            panic!(
17180                "buffer is too small (need {} bytes, but got {})",
17181                Self::ENCODED_LEN,
17182                __tmp.remaining(),
17183            )
17184        }
17185        __tmp.put_u32_le(self.uptime_ms);
17186        __tmp.put_u32_le(self.error_status.bits());
17187        __tmp.put_f32_le(self.brightness);
17188        __tmp.put_f32_le(self.strobe_period);
17189        __tmp.put_f32_le(self.strobe_duty_cycle);
17190        __tmp.put_f32_le(self.temp_c);
17191        __tmp.put_f32_le(self.min_strobe_period);
17192        __tmp.put_f32_le(self.max_strobe_period);
17193        __tmp.put_u8(self.enable);
17194        __tmp.put_u8(self.mode_bitmask as u8);
17195        __tmp.put_u8(self.mode as u8);
17196        if matches!(version, MavlinkVersion::V2) {
17197            let len = __tmp.len();
17198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17199        } else {
17200            __tmp.len()
17201        }
17202    }
17203}
17204#[doc = "id: 335"]
17205#[doc = "Status of the Iridium SBD link."]
17206#[derive(Debug, Clone, PartialEq)]
17207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17209pub struct ISBD_LINK_STATUS_DATA {
17210    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17211    pub timestamp: u64,
17212    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17213    pub last_heartbeat: u64,
17214    #[doc = "Number of failed SBD sessions."]
17215    pub failed_sessions: u16,
17216    #[doc = "Number of successful SBD sessions."]
17217    pub successful_sessions: u16,
17218    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17219    pub signal_quality: u8,
17220    #[doc = "1: Ring call pending, 0: No call pending."]
17221    pub ring_pending: u8,
17222    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17223    pub tx_session_pending: u8,
17224    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17225    pub rx_session_pending: u8,
17226}
17227impl ISBD_LINK_STATUS_DATA {
17228    pub const ENCODED_LEN: usize = 24usize;
17229    pub const DEFAULT: Self = Self {
17230        timestamp: 0_u64,
17231        last_heartbeat: 0_u64,
17232        failed_sessions: 0_u16,
17233        successful_sessions: 0_u16,
17234        signal_quality: 0_u8,
17235        ring_pending: 0_u8,
17236        tx_session_pending: 0_u8,
17237        rx_session_pending: 0_u8,
17238    };
17239    #[cfg(feature = "arbitrary")]
17240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17241        use arbitrary::{Arbitrary, Unstructured};
17242        let mut buf = [0u8; 1024];
17243        rng.fill_bytes(&mut buf);
17244        let mut unstructured = Unstructured::new(&buf);
17245        Self::arbitrary(&mut unstructured).unwrap_or_default()
17246    }
17247}
17248impl Default for ISBD_LINK_STATUS_DATA {
17249    fn default() -> Self {
17250        Self::DEFAULT.clone()
17251    }
17252}
17253impl MessageData for ISBD_LINK_STATUS_DATA {
17254    type Message = MavMessage;
17255    const ID: u32 = 335u32;
17256    const NAME: &'static str = "ISBD_LINK_STATUS";
17257    const EXTRA_CRC: u8 = 225u8;
17258    const ENCODED_LEN: usize = 24usize;
17259    fn deser(
17260        _version: MavlinkVersion,
17261        __input: &[u8],
17262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17263        let avail_len = __input.len();
17264        let mut payload_buf = [0; Self::ENCODED_LEN];
17265        let mut buf = if avail_len < Self::ENCODED_LEN {
17266            payload_buf[0..avail_len].copy_from_slice(__input);
17267            Bytes::new(&payload_buf)
17268        } else {
17269            Bytes::new(__input)
17270        };
17271        let mut __struct = Self::default();
17272        __struct.timestamp = buf.get_u64_le();
17273        __struct.last_heartbeat = buf.get_u64_le();
17274        __struct.failed_sessions = buf.get_u16_le();
17275        __struct.successful_sessions = buf.get_u16_le();
17276        __struct.signal_quality = buf.get_u8();
17277        __struct.ring_pending = buf.get_u8();
17278        __struct.tx_session_pending = buf.get_u8();
17279        __struct.rx_session_pending = buf.get_u8();
17280        Ok(__struct)
17281    }
17282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17283        let mut __tmp = BytesMut::new(bytes);
17284        #[allow(clippy::absurd_extreme_comparisons)]
17285        #[allow(unused_comparisons)]
17286        if __tmp.remaining() < Self::ENCODED_LEN {
17287            panic!(
17288                "buffer is too small (need {} bytes, but got {})",
17289                Self::ENCODED_LEN,
17290                __tmp.remaining(),
17291            )
17292        }
17293        __tmp.put_u64_le(self.timestamp);
17294        __tmp.put_u64_le(self.last_heartbeat);
17295        __tmp.put_u16_le(self.failed_sessions);
17296        __tmp.put_u16_le(self.successful_sessions);
17297        __tmp.put_u8(self.signal_quality);
17298        __tmp.put_u8(self.ring_pending);
17299        __tmp.put_u8(self.tx_session_pending);
17300        __tmp.put_u8(self.rx_session_pending);
17301        if matches!(version, MavlinkVersion::V2) {
17302            let len = __tmp.len();
17303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17304        } else {
17305            __tmp.len()
17306        }
17307    }
17308}
17309#[doc = "id: 149"]
17310#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17311#[derive(Debug, Clone, PartialEq)]
17312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17314pub struct LANDING_TARGET_DATA {
17315    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17316    pub time_usec: u64,
17317    #[doc = "X-axis angular offset of the target from the center of the image"]
17318    pub angle_x: f32,
17319    #[doc = "Y-axis angular offset of the target from the center of the image"]
17320    pub angle_y: f32,
17321    #[doc = "Distance to the target from the vehicle"]
17322    pub distance: f32,
17323    #[doc = "Size of target along x-axis"]
17324    pub size_x: f32,
17325    #[doc = "Size of target along y-axis"]
17326    pub size_y: f32,
17327    #[doc = "The ID of the target if multiple targets are present"]
17328    pub target_num: u8,
17329    #[doc = "Coordinate frame used for following fields."]
17330    pub frame: MavFrame,
17331    #[doc = "X Position of the landing target in MAV_FRAME"]
17332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17333    pub x: f32,
17334    #[doc = "Y Position of the landing target in MAV_FRAME"]
17335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17336    pub y: f32,
17337    #[doc = "Z Position of the landing target in MAV_FRAME"]
17338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17339    pub z: f32,
17340    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17341    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17343    pub q: [f32; 4],
17344    #[doc = "Type of landing target"]
17345    #[cfg_attr(feature = "serde", serde(default))]
17346    pub mavtype: LandingTargetType,
17347    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17349    pub position_valid: u8,
17350}
17351impl LANDING_TARGET_DATA {
17352    pub const ENCODED_LEN: usize = 60usize;
17353    pub const DEFAULT: Self = Self {
17354        time_usec: 0_u64,
17355        angle_x: 0.0_f32,
17356        angle_y: 0.0_f32,
17357        distance: 0.0_f32,
17358        size_x: 0.0_f32,
17359        size_y: 0.0_f32,
17360        target_num: 0_u8,
17361        frame: MavFrame::DEFAULT,
17362        x: 0.0_f32,
17363        y: 0.0_f32,
17364        z: 0.0_f32,
17365        q: [0.0_f32; 4usize],
17366        mavtype: LandingTargetType::DEFAULT,
17367        position_valid: 0_u8,
17368    };
17369    #[cfg(feature = "arbitrary")]
17370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17371        use arbitrary::{Arbitrary, Unstructured};
17372        let mut buf = [0u8; 1024];
17373        rng.fill_bytes(&mut buf);
17374        let mut unstructured = Unstructured::new(&buf);
17375        Self::arbitrary(&mut unstructured).unwrap_or_default()
17376    }
17377}
17378impl Default for LANDING_TARGET_DATA {
17379    fn default() -> Self {
17380        Self::DEFAULT.clone()
17381    }
17382}
17383impl MessageData for LANDING_TARGET_DATA {
17384    type Message = MavMessage;
17385    const ID: u32 = 149u32;
17386    const NAME: &'static str = "LANDING_TARGET";
17387    const EXTRA_CRC: u8 = 200u8;
17388    const ENCODED_LEN: usize = 60usize;
17389    fn deser(
17390        _version: MavlinkVersion,
17391        __input: &[u8],
17392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17393        let avail_len = __input.len();
17394        let mut payload_buf = [0; Self::ENCODED_LEN];
17395        let mut buf = if avail_len < Self::ENCODED_LEN {
17396            payload_buf[0..avail_len].copy_from_slice(__input);
17397            Bytes::new(&payload_buf)
17398        } else {
17399            Bytes::new(__input)
17400        };
17401        let mut __struct = Self::default();
17402        __struct.time_usec = buf.get_u64_le();
17403        __struct.angle_x = buf.get_f32_le();
17404        __struct.angle_y = buf.get_f32_le();
17405        __struct.distance = buf.get_f32_le();
17406        __struct.size_x = buf.get_f32_le();
17407        __struct.size_y = buf.get_f32_le();
17408        __struct.target_num = buf.get_u8();
17409        let tmp = buf.get_u8();
17410        __struct.frame =
17411            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17412                enum_type: "MavFrame",
17413                value: tmp as u32,
17414            })?;
17415        __struct.x = buf.get_f32_le();
17416        __struct.y = buf.get_f32_le();
17417        __struct.z = buf.get_f32_le();
17418        for v in &mut __struct.q {
17419            let val = buf.get_f32_le();
17420            *v = val;
17421        }
17422        let tmp = buf.get_u8();
17423        __struct.mavtype =
17424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17425                enum_type: "LandingTargetType",
17426                value: tmp as u32,
17427            })?;
17428        __struct.position_valid = buf.get_u8();
17429        Ok(__struct)
17430    }
17431    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17432        let mut __tmp = BytesMut::new(bytes);
17433        #[allow(clippy::absurd_extreme_comparisons)]
17434        #[allow(unused_comparisons)]
17435        if __tmp.remaining() < Self::ENCODED_LEN {
17436            panic!(
17437                "buffer is too small (need {} bytes, but got {})",
17438                Self::ENCODED_LEN,
17439                __tmp.remaining(),
17440            )
17441        }
17442        __tmp.put_u64_le(self.time_usec);
17443        __tmp.put_f32_le(self.angle_x);
17444        __tmp.put_f32_le(self.angle_y);
17445        __tmp.put_f32_le(self.distance);
17446        __tmp.put_f32_le(self.size_x);
17447        __tmp.put_f32_le(self.size_y);
17448        __tmp.put_u8(self.target_num);
17449        __tmp.put_u8(self.frame as u8);
17450        __tmp.put_f32_le(self.x);
17451        __tmp.put_f32_le(self.y);
17452        __tmp.put_f32_le(self.z);
17453        for val in &self.q {
17454            __tmp.put_f32_le(*val);
17455        }
17456        __tmp.put_u8(self.mavtype as u8);
17457        __tmp.put_u8(self.position_valid);
17458        if matches!(version, MavlinkVersion::V2) {
17459            let len = __tmp.len();
17460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17461        } else {
17462            __tmp.len()
17463        }
17464    }
17465}
17466#[doc = "id: 8"]
17467#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17468#[derive(Debug, Clone, PartialEq)]
17469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17471pub struct LINK_NODE_STATUS_DATA {
17472    #[doc = "Timestamp (time since system boot)."]
17473    pub timestamp: u64,
17474    #[doc = "Transmit rate"]
17475    pub tx_rate: u32,
17476    #[doc = "Receive rate"]
17477    pub rx_rate: u32,
17478    #[doc = "Messages sent"]
17479    pub messages_sent: u32,
17480    #[doc = "Messages received (estimated from counting seq)"]
17481    pub messages_received: u32,
17482    #[doc = "Messages lost (estimated from counting seq)"]
17483    pub messages_lost: u32,
17484    #[doc = "Number of bytes that could not be parsed correctly."]
17485    pub rx_parse_err: u16,
17486    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17487    pub tx_overflows: u16,
17488    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17489    pub rx_overflows: u16,
17490    #[doc = "Remaining free transmit buffer space"]
17491    pub tx_buf: u8,
17492    #[doc = "Remaining free receive buffer space"]
17493    pub rx_buf: u8,
17494}
17495impl LINK_NODE_STATUS_DATA {
17496    pub const ENCODED_LEN: usize = 36usize;
17497    pub const DEFAULT: Self = Self {
17498        timestamp: 0_u64,
17499        tx_rate: 0_u32,
17500        rx_rate: 0_u32,
17501        messages_sent: 0_u32,
17502        messages_received: 0_u32,
17503        messages_lost: 0_u32,
17504        rx_parse_err: 0_u16,
17505        tx_overflows: 0_u16,
17506        rx_overflows: 0_u16,
17507        tx_buf: 0_u8,
17508        rx_buf: 0_u8,
17509    };
17510    #[cfg(feature = "arbitrary")]
17511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17512        use arbitrary::{Arbitrary, Unstructured};
17513        let mut buf = [0u8; 1024];
17514        rng.fill_bytes(&mut buf);
17515        let mut unstructured = Unstructured::new(&buf);
17516        Self::arbitrary(&mut unstructured).unwrap_or_default()
17517    }
17518}
17519impl Default for LINK_NODE_STATUS_DATA {
17520    fn default() -> Self {
17521        Self::DEFAULT.clone()
17522    }
17523}
17524impl MessageData for LINK_NODE_STATUS_DATA {
17525    type Message = MavMessage;
17526    const ID: u32 = 8u32;
17527    const NAME: &'static str = "LINK_NODE_STATUS";
17528    const EXTRA_CRC: u8 = 117u8;
17529    const ENCODED_LEN: usize = 36usize;
17530    fn deser(
17531        _version: MavlinkVersion,
17532        __input: &[u8],
17533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17534        let avail_len = __input.len();
17535        let mut payload_buf = [0; Self::ENCODED_LEN];
17536        let mut buf = if avail_len < Self::ENCODED_LEN {
17537            payload_buf[0..avail_len].copy_from_slice(__input);
17538            Bytes::new(&payload_buf)
17539        } else {
17540            Bytes::new(__input)
17541        };
17542        let mut __struct = Self::default();
17543        __struct.timestamp = buf.get_u64_le();
17544        __struct.tx_rate = buf.get_u32_le();
17545        __struct.rx_rate = buf.get_u32_le();
17546        __struct.messages_sent = buf.get_u32_le();
17547        __struct.messages_received = buf.get_u32_le();
17548        __struct.messages_lost = buf.get_u32_le();
17549        __struct.rx_parse_err = buf.get_u16_le();
17550        __struct.tx_overflows = buf.get_u16_le();
17551        __struct.rx_overflows = buf.get_u16_le();
17552        __struct.tx_buf = buf.get_u8();
17553        __struct.rx_buf = buf.get_u8();
17554        Ok(__struct)
17555    }
17556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17557        let mut __tmp = BytesMut::new(bytes);
17558        #[allow(clippy::absurd_extreme_comparisons)]
17559        #[allow(unused_comparisons)]
17560        if __tmp.remaining() < Self::ENCODED_LEN {
17561            panic!(
17562                "buffer is too small (need {} bytes, but got {})",
17563                Self::ENCODED_LEN,
17564                __tmp.remaining(),
17565            )
17566        }
17567        __tmp.put_u64_le(self.timestamp);
17568        __tmp.put_u32_le(self.tx_rate);
17569        __tmp.put_u32_le(self.rx_rate);
17570        __tmp.put_u32_le(self.messages_sent);
17571        __tmp.put_u32_le(self.messages_received);
17572        __tmp.put_u32_le(self.messages_lost);
17573        __tmp.put_u16_le(self.rx_parse_err);
17574        __tmp.put_u16_le(self.tx_overflows);
17575        __tmp.put_u16_le(self.rx_overflows);
17576        __tmp.put_u8(self.tx_buf);
17577        __tmp.put_u8(self.rx_buf);
17578        if matches!(version, MavlinkVersion::V2) {
17579            let len = __tmp.len();
17580            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17581        } else {
17582            __tmp.len()
17583        }
17584    }
17585}
17586#[doc = "id: 32"]
17587#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17588#[derive(Debug, Clone, PartialEq)]
17589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17591pub struct LOCAL_POSITION_NED_DATA {
17592    #[doc = "Timestamp (time since system boot)."]
17593    pub time_boot_ms: u32,
17594    #[doc = "X Position"]
17595    pub x: f32,
17596    #[doc = "Y Position"]
17597    pub y: f32,
17598    #[doc = "Z Position"]
17599    pub z: f32,
17600    #[doc = "X Speed"]
17601    pub vx: f32,
17602    #[doc = "Y Speed"]
17603    pub vy: f32,
17604    #[doc = "Z Speed"]
17605    pub vz: f32,
17606}
17607impl LOCAL_POSITION_NED_DATA {
17608    pub const ENCODED_LEN: usize = 28usize;
17609    pub const DEFAULT: Self = Self {
17610        time_boot_ms: 0_u32,
17611        x: 0.0_f32,
17612        y: 0.0_f32,
17613        z: 0.0_f32,
17614        vx: 0.0_f32,
17615        vy: 0.0_f32,
17616        vz: 0.0_f32,
17617    };
17618    #[cfg(feature = "arbitrary")]
17619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17620        use arbitrary::{Arbitrary, Unstructured};
17621        let mut buf = [0u8; 1024];
17622        rng.fill_bytes(&mut buf);
17623        let mut unstructured = Unstructured::new(&buf);
17624        Self::arbitrary(&mut unstructured).unwrap_or_default()
17625    }
17626}
17627impl Default for LOCAL_POSITION_NED_DATA {
17628    fn default() -> Self {
17629        Self::DEFAULT.clone()
17630    }
17631}
17632impl MessageData for LOCAL_POSITION_NED_DATA {
17633    type Message = MavMessage;
17634    const ID: u32 = 32u32;
17635    const NAME: &'static str = "LOCAL_POSITION_NED";
17636    const EXTRA_CRC: u8 = 185u8;
17637    const ENCODED_LEN: usize = 28usize;
17638    fn deser(
17639        _version: MavlinkVersion,
17640        __input: &[u8],
17641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17642        let avail_len = __input.len();
17643        let mut payload_buf = [0; Self::ENCODED_LEN];
17644        let mut buf = if avail_len < Self::ENCODED_LEN {
17645            payload_buf[0..avail_len].copy_from_slice(__input);
17646            Bytes::new(&payload_buf)
17647        } else {
17648            Bytes::new(__input)
17649        };
17650        let mut __struct = Self::default();
17651        __struct.time_boot_ms = buf.get_u32_le();
17652        __struct.x = buf.get_f32_le();
17653        __struct.y = buf.get_f32_le();
17654        __struct.z = buf.get_f32_le();
17655        __struct.vx = buf.get_f32_le();
17656        __struct.vy = buf.get_f32_le();
17657        __struct.vz = buf.get_f32_le();
17658        Ok(__struct)
17659    }
17660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17661        let mut __tmp = BytesMut::new(bytes);
17662        #[allow(clippy::absurd_extreme_comparisons)]
17663        #[allow(unused_comparisons)]
17664        if __tmp.remaining() < Self::ENCODED_LEN {
17665            panic!(
17666                "buffer is too small (need {} bytes, but got {})",
17667                Self::ENCODED_LEN,
17668                __tmp.remaining(),
17669            )
17670        }
17671        __tmp.put_u32_le(self.time_boot_ms);
17672        __tmp.put_f32_le(self.x);
17673        __tmp.put_f32_le(self.y);
17674        __tmp.put_f32_le(self.z);
17675        __tmp.put_f32_le(self.vx);
17676        __tmp.put_f32_le(self.vy);
17677        __tmp.put_f32_le(self.vz);
17678        if matches!(version, MavlinkVersion::V2) {
17679            let len = __tmp.len();
17680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17681        } else {
17682            __tmp.len()
17683        }
17684    }
17685}
17686#[doc = "id: 64"]
17687#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17688#[derive(Debug, Clone, PartialEq)]
17689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17691pub struct LOCAL_POSITION_NED_COV_DATA {
17692    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17693    pub time_usec: u64,
17694    #[doc = "X Position"]
17695    pub x: f32,
17696    #[doc = "Y Position"]
17697    pub y: f32,
17698    #[doc = "Z Position"]
17699    pub z: f32,
17700    #[doc = "X Speed"]
17701    pub vx: f32,
17702    #[doc = "Y Speed"]
17703    pub vy: f32,
17704    #[doc = "Z Speed"]
17705    pub vz: f32,
17706    #[doc = "X Acceleration"]
17707    pub ax: f32,
17708    #[doc = "Y Acceleration"]
17709    pub ay: f32,
17710    #[doc = "Z Acceleration"]
17711    pub az: f32,
17712    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17713    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17714    pub covariance: [f32; 45],
17715    #[doc = "Class id of the estimator this estimate originated from."]
17716    pub estimator_type: MavEstimatorType,
17717}
17718impl LOCAL_POSITION_NED_COV_DATA {
17719    pub const ENCODED_LEN: usize = 225usize;
17720    pub const DEFAULT: Self = Self {
17721        time_usec: 0_u64,
17722        x: 0.0_f32,
17723        y: 0.0_f32,
17724        z: 0.0_f32,
17725        vx: 0.0_f32,
17726        vy: 0.0_f32,
17727        vz: 0.0_f32,
17728        ax: 0.0_f32,
17729        ay: 0.0_f32,
17730        az: 0.0_f32,
17731        covariance: [0.0_f32; 45usize],
17732        estimator_type: MavEstimatorType::DEFAULT,
17733    };
17734    #[cfg(feature = "arbitrary")]
17735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17736        use arbitrary::{Arbitrary, Unstructured};
17737        let mut buf = [0u8; 1024];
17738        rng.fill_bytes(&mut buf);
17739        let mut unstructured = Unstructured::new(&buf);
17740        Self::arbitrary(&mut unstructured).unwrap_or_default()
17741    }
17742}
17743impl Default for LOCAL_POSITION_NED_COV_DATA {
17744    fn default() -> Self {
17745        Self::DEFAULT.clone()
17746    }
17747}
17748impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17749    type Message = MavMessage;
17750    const ID: u32 = 64u32;
17751    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17752    const EXTRA_CRC: u8 = 191u8;
17753    const ENCODED_LEN: usize = 225usize;
17754    fn deser(
17755        _version: MavlinkVersion,
17756        __input: &[u8],
17757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17758        let avail_len = __input.len();
17759        let mut payload_buf = [0; Self::ENCODED_LEN];
17760        let mut buf = if avail_len < Self::ENCODED_LEN {
17761            payload_buf[0..avail_len].copy_from_slice(__input);
17762            Bytes::new(&payload_buf)
17763        } else {
17764            Bytes::new(__input)
17765        };
17766        let mut __struct = Self::default();
17767        __struct.time_usec = buf.get_u64_le();
17768        __struct.x = buf.get_f32_le();
17769        __struct.y = buf.get_f32_le();
17770        __struct.z = buf.get_f32_le();
17771        __struct.vx = buf.get_f32_le();
17772        __struct.vy = buf.get_f32_le();
17773        __struct.vz = buf.get_f32_le();
17774        __struct.ax = buf.get_f32_le();
17775        __struct.ay = buf.get_f32_le();
17776        __struct.az = buf.get_f32_le();
17777        for v in &mut __struct.covariance {
17778            let val = buf.get_f32_le();
17779            *v = val;
17780        }
17781        let tmp = buf.get_u8();
17782        __struct.estimator_type =
17783            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17784                enum_type: "MavEstimatorType",
17785                value: tmp as u32,
17786            })?;
17787        Ok(__struct)
17788    }
17789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17790        let mut __tmp = BytesMut::new(bytes);
17791        #[allow(clippy::absurd_extreme_comparisons)]
17792        #[allow(unused_comparisons)]
17793        if __tmp.remaining() < Self::ENCODED_LEN {
17794            panic!(
17795                "buffer is too small (need {} bytes, but got {})",
17796                Self::ENCODED_LEN,
17797                __tmp.remaining(),
17798            )
17799        }
17800        __tmp.put_u64_le(self.time_usec);
17801        __tmp.put_f32_le(self.x);
17802        __tmp.put_f32_le(self.y);
17803        __tmp.put_f32_le(self.z);
17804        __tmp.put_f32_le(self.vx);
17805        __tmp.put_f32_le(self.vy);
17806        __tmp.put_f32_le(self.vz);
17807        __tmp.put_f32_le(self.ax);
17808        __tmp.put_f32_le(self.ay);
17809        __tmp.put_f32_le(self.az);
17810        for val in &self.covariance {
17811            __tmp.put_f32_le(*val);
17812        }
17813        __tmp.put_u8(self.estimator_type as u8);
17814        if matches!(version, MavlinkVersion::V2) {
17815            let len = __tmp.len();
17816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17817        } else {
17818            __tmp.len()
17819        }
17820    }
17821}
17822#[doc = "id: 89"]
17823#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17824#[derive(Debug, Clone, PartialEq)]
17825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17827pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17828    #[doc = "Timestamp (time since system boot)."]
17829    pub time_boot_ms: u32,
17830    #[doc = "X Position"]
17831    pub x: f32,
17832    #[doc = "Y Position"]
17833    pub y: f32,
17834    #[doc = "Z Position"]
17835    pub z: f32,
17836    #[doc = "Roll"]
17837    pub roll: f32,
17838    #[doc = "Pitch"]
17839    pub pitch: f32,
17840    #[doc = "Yaw"]
17841    pub yaw: f32,
17842}
17843impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17844    pub const ENCODED_LEN: usize = 28usize;
17845    pub const DEFAULT: Self = Self {
17846        time_boot_ms: 0_u32,
17847        x: 0.0_f32,
17848        y: 0.0_f32,
17849        z: 0.0_f32,
17850        roll: 0.0_f32,
17851        pitch: 0.0_f32,
17852        yaw: 0.0_f32,
17853    };
17854    #[cfg(feature = "arbitrary")]
17855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17856        use arbitrary::{Arbitrary, Unstructured};
17857        let mut buf = [0u8; 1024];
17858        rng.fill_bytes(&mut buf);
17859        let mut unstructured = Unstructured::new(&buf);
17860        Self::arbitrary(&mut unstructured).unwrap_or_default()
17861    }
17862}
17863impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17864    fn default() -> Self {
17865        Self::DEFAULT.clone()
17866    }
17867}
17868impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17869    type Message = MavMessage;
17870    const ID: u32 = 89u32;
17871    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17872    const EXTRA_CRC: u8 = 231u8;
17873    const ENCODED_LEN: usize = 28usize;
17874    fn deser(
17875        _version: MavlinkVersion,
17876        __input: &[u8],
17877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17878        let avail_len = __input.len();
17879        let mut payload_buf = [0; Self::ENCODED_LEN];
17880        let mut buf = if avail_len < Self::ENCODED_LEN {
17881            payload_buf[0..avail_len].copy_from_slice(__input);
17882            Bytes::new(&payload_buf)
17883        } else {
17884            Bytes::new(__input)
17885        };
17886        let mut __struct = Self::default();
17887        __struct.time_boot_ms = buf.get_u32_le();
17888        __struct.x = buf.get_f32_le();
17889        __struct.y = buf.get_f32_le();
17890        __struct.z = buf.get_f32_le();
17891        __struct.roll = buf.get_f32_le();
17892        __struct.pitch = buf.get_f32_le();
17893        __struct.yaw = buf.get_f32_le();
17894        Ok(__struct)
17895    }
17896    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17897        let mut __tmp = BytesMut::new(bytes);
17898        #[allow(clippy::absurd_extreme_comparisons)]
17899        #[allow(unused_comparisons)]
17900        if __tmp.remaining() < Self::ENCODED_LEN {
17901            panic!(
17902                "buffer is too small (need {} bytes, but got {})",
17903                Self::ENCODED_LEN,
17904                __tmp.remaining(),
17905            )
17906        }
17907        __tmp.put_u32_le(self.time_boot_ms);
17908        __tmp.put_f32_le(self.x);
17909        __tmp.put_f32_le(self.y);
17910        __tmp.put_f32_le(self.z);
17911        __tmp.put_f32_le(self.roll);
17912        __tmp.put_f32_le(self.pitch);
17913        __tmp.put_f32_le(self.yaw);
17914        if matches!(version, MavlinkVersion::V2) {
17915            let len = __tmp.len();
17916            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17917        } else {
17918            __tmp.len()
17919        }
17920    }
17921}
17922#[doc = "id: 268"]
17923#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17924#[derive(Debug, Clone, PartialEq)]
17925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17927pub struct LOGGING_ACK_DATA {
17928    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17929    pub sequence: u16,
17930    #[doc = "system ID of the target"]
17931    pub target_system: u8,
17932    #[doc = "component ID of the target"]
17933    pub target_component: u8,
17934}
17935impl LOGGING_ACK_DATA {
17936    pub const ENCODED_LEN: usize = 4usize;
17937    pub const DEFAULT: Self = Self {
17938        sequence: 0_u16,
17939        target_system: 0_u8,
17940        target_component: 0_u8,
17941    };
17942    #[cfg(feature = "arbitrary")]
17943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17944        use arbitrary::{Arbitrary, Unstructured};
17945        let mut buf = [0u8; 1024];
17946        rng.fill_bytes(&mut buf);
17947        let mut unstructured = Unstructured::new(&buf);
17948        Self::arbitrary(&mut unstructured).unwrap_or_default()
17949    }
17950}
17951impl Default for LOGGING_ACK_DATA {
17952    fn default() -> Self {
17953        Self::DEFAULT.clone()
17954    }
17955}
17956impl MessageData for LOGGING_ACK_DATA {
17957    type Message = MavMessage;
17958    const ID: u32 = 268u32;
17959    const NAME: &'static str = "LOGGING_ACK";
17960    const EXTRA_CRC: u8 = 14u8;
17961    const ENCODED_LEN: usize = 4usize;
17962    fn deser(
17963        _version: MavlinkVersion,
17964        __input: &[u8],
17965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17966        let avail_len = __input.len();
17967        let mut payload_buf = [0; Self::ENCODED_LEN];
17968        let mut buf = if avail_len < Self::ENCODED_LEN {
17969            payload_buf[0..avail_len].copy_from_slice(__input);
17970            Bytes::new(&payload_buf)
17971        } else {
17972            Bytes::new(__input)
17973        };
17974        let mut __struct = Self::default();
17975        __struct.sequence = buf.get_u16_le();
17976        __struct.target_system = buf.get_u8();
17977        __struct.target_component = buf.get_u8();
17978        Ok(__struct)
17979    }
17980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17981        let mut __tmp = BytesMut::new(bytes);
17982        #[allow(clippy::absurd_extreme_comparisons)]
17983        #[allow(unused_comparisons)]
17984        if __tmp.remaining() < Self::ENCODED_LEN {
17985            panic!(
17986                "buffer is too small (need {} bytes, but got {})",
17987                Self::ENCODED_LEN,
17988                __tmp.remaining(),
17989            )
17990        }
17991        __tmp.put_u16_le(self.sequence);
17992        __tmp.put_u8(self.target_system);
17993        __tmp.put_u8(self.target_component);
17994        if matches!(version, MavlinkVersion::V2) {
17995            let len = __tmp.len();
17996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17997        } else {
17998            __tmp.len()
17999        }
18000    }
18001}
18002#[doc = "id: 266"]
18003#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18004#[derive(Debug, Clone, PartialEq)]
18005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18007pub struct LOGGING_DATA_DATA {
18008    #[doc = "sequence number (can wrap)"]
18009    pub sequence: u16,
18010    #[doc = "system ID of the target"]
18011    pub target_system: u8,
18012    #[doc = "component ID of the target"]
18013    pub target_component: u8,
18014    #[doc = "data length"]
18015    pub length: u8,
18016    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18017    pub first_message_offset: u8,
18018    #[doc = "logged data"]
18019    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18020    pub data: [u8; 249],
18021}
18022impl LOGGING_DATA_DATA {
18023    pub const ENCODED_LEN: usize = 255usize;
18024    pub const DEFAULT: Self = Self {
18025        sequence: 0_u16,
18026        target_system: 0_u8,
18027        target_component: 0_u8,
18028        length: 0_u8,
18029        first_message_offset: 0_u8,
18030        data: [0_u8; 249usize],
18031    };
18032    #[cfg(feature = "arbitrary")]
18033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18034        use arbitrary::{Arbitrary, Unstructured};
18035        let mut buf = [0u8; 1024];
18036        rng.fill_bytes(&mut buf);
18037        let mut unstructured = Unstructured::new(&buf);
18038        Self::arbitrary(&mut unstructured).unwrap_or_default()
18039    }
18040}
18041impl Default for LOGGING_DATA_DATA {
18042    fn default() -> Self {
18043        Self::DEFAULT.clone()
18044    }
18045}
18046impl MessageData for LOGGING_DATA_DATA {
18047    type Message = MavMessage;
18048    const ID: u32 = 266u32;
18049    const NAME: &'static str = "LOGGING_DATA";
18050    const EXTRA_CRC: u8 = 193u8;
18051    const ENCODED_LEN: usize = 255usize;
18052    fn deser(
18053        _version: MavlinkVersion,
18054        __input: &[u8],
18055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18056        let avail_len = __input.len();
18057        let mut payload_buf = [0; Self::ENCODED_LEN];
18058        let mut buf = if avail_len < Self::ENCODED_LEN {
18059            payload_buf[0..avail_len].copy_from_slice(__input);
18060            Bytes::new(&payload_buf)
18061        } else {
18062            Bytes::new(__input)
18063        };
18064        let mut __struct = Self::default();
18065        __struct.sequence = buf.get_u16_le();
18066        __struct.target_system = buf.get_u8();
18067        __struct.target_component = buf.get_u8();
18068        __struct.length = buf.get_u8();
18069        __struct.first_message_offset = buf.get_u8();
18070        for v in &mut __struct.data {
18071            let val = buf.get_u8();
18072            *v = val;
18073        }
18074        Ok(__struct)
18075    }
18076    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18077        let mut __tmp = BytesMut::new(bytes);
18078        #[allow(clippy::absurd_extreme_comparisons)]
18079        #[allow(unused_comparisons)]
18080        if __tmp.remaining() < Self::ENCODED_LEN {
18081            panic!(
18082                "buffer is too small (need {} bytes, but got {})",
18083                Self::ENCODED_LEN,
18084                __tmp.remaining(),
18085            )
18086        }
18087        __tmp.put_u16_le(self.sequence);
18088        __tmp.put_u8(self.target_system);
18089        __tmp.put_u8(self.target_component);
18090        __tmp.put_u8(self.length);
18091        __tmp.put_u8(self.first_message_offset);
18092        for val in &self.data {
18093            __tmp.put_u8(*val);
18094        }
18095        if matches!(version, MavlinkVersion::V2) {
18096            let len = __tmp.len();
18097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18098        } else {
18099            __tmp.len()
18100        }
18101    }
18102}
18103#[doc = "id: 267"]
18104#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18105#[derive(Debug, Clone, PartialEq)]
18106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18108pub struct LOGGING_DATA_ACKED_DATA {
18109    #[doc = "sequence number (can wrap)"]
18110    pub sequence: u16,
18111    #[doc = "system ID of the target"]
18112    pub target_system: u8,
18113    #[doc = "component ID of the target"]
18114    pub target_component: u8,
18115    #[doc = "data length"]
18116    pub length: u8,
18117    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18118    pub first_message_offset: u8,
18119    #[doc = "logged data"]
18120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18121    pub data: [u8; 249],
18122}
18123impl LOGGING_DATA_ACKED_DATA {
18124    pub const ENCODED_LEN: usize = 255usize;
18125    pub const DEFAULT: Self = Self {
18126        sequence: 0_u16,
18127        target_system: 0_u8,
18128        target_component: 0_u8,
18129        length: 0_u8,
18130        first_message_offset: 0_u8,
18131        data: [0_u8; 249usize],
18132    };
18133    #[cfg(feature = "arbitrary")]
18134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18135        use arbitrary::{Arbitrary, Unstructured};
18136        let mut buf = [0u8; 1024];
18137        rng.fill_bytes(&mut buf);
18138        let mut unstructured = Unstructured::new(&buf);
18139        Self::arbitrary(&mut unstructured).unwrap_or_default()
18140    }
18141}
18142impl Default for LOGGING_DATA_ACKED_DATA {
18143    fn default() -> Self {
18144        Self::DEFAULT.clone()
18145    }
18146}
18147impl MessageData for LOGGING_DATA_ACKED_DATA {
18148    type Message = MavMessage;
18149    const ID: u32 = 267u32;
18150    const NAME: &'static str = "LOGGING_DATA_ACKED";
18151    const EXTRA_CRC: u8 = 35u8;
18152    const ENCODED_LEN: usize = 255usize;
18153    fn deser(
18154        _version: MavlinkVersion,
18155        __input: &[u8],
18156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18157        let avail_len = __input.len();
18158        let mut payload_buf = [0; Self::ENCODED_LEN];
18159        let mut buf = if avail_len < Self::ENCODED_LEN {
18160            payload_buf[0..avail_len].copy_from_slice(__input);
18161            Bytes::new(&payload_buf)
18162        } else {
18163            Bytes::new(__input)
18164        };
18165        let mut __struct = Self::default();
18166        __struct.sequence = buf.get_u16_le();
18167        __struct.target_system = buf.get_u8();
18168        __struct.target_component = buf.get_u8();
18169        __struct.length = buf.get_u8();
18170        __struct.first_message_offset = buf.get_u8();
18171        for v in &mut __struct.data {
18172            let val = buf.get_u8();
18173            *v = val;
18174        }
18175        Ok(__struct)
18176    }
18177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18178        let mut __tmp = BytesMut::new(bytes);
18179        #[allow(clippy::absurd_extreme_comparisons)]
18180        #[allow(unused_comparisons)]
18181        if __tmp.remaining() < Self::ENCODED_LEN {
18182            panic!(
18183                "buffer is too small (need {} bytes, but got {})",
18184                Self::ENCODED_LEN,
18185                __tmp.remaining(),
18186            )
18187        }
18188        __tmp.put_u16_le(self.sequence);
18189        __tmp.put_u8(self.target_system);
18190        __tmp.put_u8(self.target_component);
18191        __tmp.put_u8(self.length);
18192        __tmp.put_u8(self.first_message_offset);
18193        for val in &self.data {
18194            __tmp.put_u8(*val);
18195        }
18196        if matches!(version, MavlinkVersion::V2) {
18197            let len = __tmp.len();
18198            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18199        } else {
18200            __tmp.len()
18201        }
18202    }
18203}
18204#[doc = "id: 120"]
18205#[doc = "Reply to LOG_REQUEST_DATA."]
18206#[derive(Debug, Clone, PartialEq)]
18207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18209pub struct LOG_DATA_DATA {
18210    #[doc = "Offset into the log"]
18211    pub ofs: u32,
18212    #[doc = "Log id (from LOG_ENTRY reply)"]
18213    pub id: u16,
18214    #[doc = "Number of bytes (zero for end of log)"]
18215    pub count: u8,
18216    #[doc = "log data"]
18217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18218    pub data: [u8; 90],
18219}
18220impl LOG_DATA_DATA {
18221    pub const ENCODED_LEN: usize = 97usize;
18222    pub const DEFAULT: Self = Self {
18223        ofs: 0_u32,
18224        id: 0_u16,
18225        count: 0_u8,
18226        data: [0_u8; 90usize],
18227    };
18228    #[cfg(feature = "arbitrary")]
18229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18230        use arbitrary::{Arbitrary, Unstructured};
18231        let mut buf = [0u8; 1024];
18232        rng.fill_bytes(&mut buf);
18233        let mut unstructured = Unstructured::new(&buf);
18234        Self::arbitrary(&mut unstructured).unwrap_or_default()
18235    }
18236}
18237impl Default for LOG_DATA_DATA {
18238    fn default() -> Self {
18239        Self::DEFAULT.clone()
18240    }
18241}
18242impl MessageData for LOG_DATA_DATA {
18243    type Message = MavMessage;
18244    const ID: u32 = 120u32;
18245    const NAME: &'static str = "LOG_DATA";
18246    const EXTRA_CRC: u8 = 134u8;
18247    const ENCODED_LEN: usize = 97usize;
18248    fn deser(
18249        _version: MavlinkVersion,
18250        __input: &[u8],
18251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18252        let avail_len = __input.len();
18253        let mut payload_buf = [0; Self::ENCODED_LEN];
18254        let mut buf = if avail_len < Self::ENCODED_LEN {
18255            payload_buf[0..avail_len].copy_from_slice(__input);
18256            Bytes::new(&payload_buf)
18257        } else {
18258            Bytes::new(__input)
18259        };
18260        let mut __struct = Self::default();
18261        __struct.ofs = buf.get_u32_le();
18262        __struct.id = buf.get_u16_le();
18263        __struct.count = buf.get_u8();
18264        for v in &mut __struct.data {
18265            let val = buf.get_u8();
18266            *v = val;
18267        }
18268        Ok(__struct)
18269    }
18270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18271        let mut __tmp = BytesMut::new(bytes);
18272        #[allow(clippy::absurd_extreme_comparisons)]
18273        #[allow(unused_comparisons)]
18274        if __tmp.remaining() < Self::ENCODED_LEN {
18275            panic!(
18276                "buffer is too small (need {} bytes, but got {})",
18277                Self::ENCODED_LEN,
18278                __tmp.remaining(),
18279            )
18280        }
18281        __tmp.put_u32_le(self.ofs);
18282        __tmp.put_u16_le(self.id);
18283        __tmp.put_u8(self.count);
18284        for val in &self.data {
18285            __tmp.put_u8(*val);
18286        }
18287        if matches!(version, MavlinkVersion::V2) {
18288            let len = __tmp.len();
18289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18290        } else {
18291            __tmp.len()
18292        }
18293    }
18294}
18295#[doc = "id: 118"]
18296#[doc = "Reply to LOG_REQUEST_LIST."]
18297#[derive(Debug, Clone, PartialEq)]
18298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18300pub struct LOG_ENTRY_DATA {
18301    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18302    pub time_utc: u32,
18303    #[doc = "Size of the log (may be approximate)"]
18304    pub size: u32,
18305    #[doc = "Log id"]
18306    pub id: u16,
18307    #[doc = "Total number of logs"]
18308    pub num_logs: u16,
18309    #[doc = "High log number"]
18310    pub last_log_num: u16,
18311}
18312impl LOG_ENTRY_DATA {
18313    pub const ENCODED_LEN: usize = 14usize;
18314    pub const DEFAULT: Self = Self {
18315        time_utc: 0_u32,
18316        size: 0_u32,
18317        id: 0_u16,
18318        num_logs: 0_u16,
18319        last_log_num: 0_u16,
18320    };
18321    #[cfg(feature = "arbitrary")]
18322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18323        use arbitrary::{Arbitrary, Unstructured};
18324        let mut buf = [0u8; 1024];
18325        rng.fill_bytes(&mut buf);
18326        let mut unstructured = Unstructured::new(&buf);
18327        Self::arbitrary(&mut unstructured).unwrap_or_default()
18328    }
18329}
18330impl Default for LOG_ENTRY_DATA {
18331    fn default() -> Self {
18332        Self::DEFAULT.clone()
18333    }
18334}
18335impl MessageData for LOG_ENTRY_DATA {
18336    type Message = MavMessage;
18337    const ID: u32 = 118u32;
18338    const NAME: &'static str = "LOG_ENTRY";
18339    const EXTRA_CRC: u8 = 56u8;
18340    const ENCODED_LEN: usize = 14usize;
18341    fn deser(
18342        _version: MavlinkVersion,
18343        __input: &[u8],
18344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18345        let avail_len = __input.len();
18346        let mut payload_buf = [0; Self::ENCODED_LEN];
18347        let mut buf = if avail_len < Self::ENCODED_LEN {
18348            payload_buf[0..avail_len].copy_from_slice(__input);
18349            Bytes::new(&payload_buf)
18350        } else {
18351            Bytes::new(__input)
18352        };
18353        let mut __struct = Self::default();
18354        __struct.time_utc = buf.get_u32_le();
18355        __struct.size = buf.get_u32_le();
18356        __struct.id = buf.get_u16_le();
18357        __struct.num_logs = buf.get_u16_le();
18358        __struct.last_log_num = buf.get_u16_le();
18359        Ok(__struct)
18360    }
18361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18362        let mut __tmp = BytesMut::new(bytes);
18363        #[allow(clippy::absurd_extreme_comparisons)]
18364        #[allow(unused_comparisons)]
18365        if __tmp.remaining() < Self::ENCODED_LEN {
18366            panic!(
18367                "buffer is too small (need {} bytes, but got {})",
18368                Self::ENCODED_LEN,
18369                __tmp.remaining(),
18370            )
18371        }
18372        __tmp.put_u32_le(self.time_utc);
18373        __tmp.put_u32_le(self.size);
18374        __tmp.put_u16_le(self.id);
18375        __tmp.put_u16_le(self.num_logs);
18376        __tmp.put_u16_le(self.last_log_num);
18377        if matches!(version, MavlinkVersion::V2) {
18378            let len = __tmp.len();
18379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18380        } else {
18381            __tmp.len()
18382        }
18383    }
18384}
18385#[doc = "id: 121"]
18386#[doc = "Erase all logs."]
18387#[derive(Debug, Clone, PartialEq)]
18388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18390pub struct LOG_ERASE_DATA {
18391    #[doc = "System ID"]
18392    pub target_system: u8,
18393    #[doc = "Component ID"]
18394    pub target_component: u8,
18395}
18396impl LOG_ERASE_DATA {
18397    pub const ENCODED_LEN: usize = 2usize;
18398    pub const DEFAULT: Self = Self {
18399        target_system: 0_u8,
18400        target_component: 0_u8,
18401    };
18402    #[cfg(feature = "arbitrary")]
18403    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18404        use arbitrary::{Arbitrary, Unstructured};
18405        let mut buf = [0u8; 1024];
18406        rng.fill_bytes(&mut buf);
18407        let mut unstructured = Unstructured::new(&buf);
18408        Self::arbitrary(&mut unstructured).unwrap_or_default()
18409    }
18410}
18411impl Default for LOG_ERASE_DATA {
18412    fn default() -> Self {
18413        Self::DEFAULT.clone()
18414    }
18415}
18416impl MessageData for LOG_ERASE_DATA {
18417    type Message = MavMessage;
18418    const ID: u32 = 121u32;
18419    const NAME: &'static str = "LOG_ERASE";
18420    const EXTRA_CRC: u8 = 237u8;
18421    const ENCODED_LEN: usize = 2usize;
18422    fn deser(
18423        _version: MavlinkVersion,
18424        __input: &[u8],
18425    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18426        let avail_len = __input.len();
18427        let mut payload_buf = [0; Self::ENCODED_LEN];
18428        let mut buf = if avail_len < Self::ENCODED_LEN {
18429            payload_buf[0..avail_len].copy_from_slice(__input);
18430            Bytes::new(&payload_buf)
18431        } else {
18432            Bytes::new(__input)
18433        };
18434        let mut __struct = Self::default();
18435        __struct.target_system = buf.get_u8();
18436        __struct.target_component = buf.get_u8();
18437        Ok(__struct)
18438    }
18439    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18440        let mut __tmp = BytesMut::new(bytes);
18441        #[allow(clippy::absurd_extreme_comparisons)]
18442        #[allow(unused_comparisons)]
18443        if __tmp.remaining() < Self::ENCODED_LEN {
18444            panic!(
18445                "buffer is too small (need {} bytes, but got {})",
18446                Self::ENCODED_LEN,
18447                __tmp.remaining(),
18448            )
18449        }
18450        __tmp.put_u8(self.target_system);
18451        __tmp.put_u8(self.target_component);
18452        if matches!(version, MavlinkVersion::V2) {
18453            let len = __tmp.len();
18454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18455        } else {
18456            __tmp.len()
18457        }
18458    }
18459}
18460#[doc = "id: 119"]
18461#[doc = "Request a chunk of a log."]
18462#[derive(Debug, Clone, PartialEq)]
18463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18465pub struct LOG_REQUEST_DATA_DATA {
18466    #[doc = "Offset into the log"]
18467    pub ofs: u32,
18468    #[doc = "Number of bytes"]
18469    pub count: u32,
18470    #[doc = "Log id (from LOG_ENTRY reply)"]
18471    pub id: u16,
18472    #[doc = "System ID"]
18473    pub target_system: u8,
18474    #[doc = "Component ID"]
18475    pub target_component: u8,
18476}
18477impl LOG_REQUEST_DATA_DATA {
18478    pub const ENCODED_LEN: usize = 12usize;
18479    pub const DEFAULT: Self = Self {
18480        ofs: 0_u32,
18481        count: 0_u32,
18482        id: 0_u16,
18483        target_system: 0_u8,
18484        target_component: 0_u8,
18485    };
18486    #[cfg(feature = "arbitrary")]
18487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18488        use arbitrary::{Arbitrary, Unstructured};
18489        let mut buf = [0u8; 1024];
18490        rng.fill_bytes(&mut buf);
18491        let mut unstructured = Unstructured::new(&buf);
18492        Self::arbitrary(&mut unstructured).unwrap_or_default()
18493    }
18494}
18495impl Default for LOG_REQUEST_DATA_DATA {
18496    fn default() -> Self {
18497        Self::DEFAULT.clone()
18498    }
18499}
18500impl MessageData for LOG_REQUEST_DATA_DATA {
18501    type Message = MavMessage;
18502    const ID: u32 = 119u32;
18503    const NAME: &'static str = "LOG_REQUEST_DATA";
18504    const EXTRA_CRC: u8 = 116u8;
18505    const ENCODED_LEN: usize = 12usize;
18506    fn deser(
18507        _version: MavlinkVersion,
18508        __input: &[u8],
18509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18510        let avail_len = __input.len();
18511        let mut payload_buf = [0; Self::ENCODED_LEN];
18512        let mut buf = if avail_len < Self::ENCODED_LEN {
18513            payload_buf[0..avail_len].copy_from_slice(__input);
18514            Bytes::new(&payload_buf)
18515        } else {
18516            Bytes::new(__input)
18517        };
18518        let mut __struct = Self::default();
18519        __struct.ofs = buf.get_u32_le();
18520        __struct.count = buf.get_u32_le();
18521        __struct.id = buf.get_u16_le();
18522        __struct.target_system = buf.get_u8();
18523        __struct.target_component = buf.get_u8();
18524        Ok(__struct)
18525    }
18526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18527        let mut __tmp = BytesMut::new(bytes);
18528        #[allow(clippy::absurd_extreme_comparisons)]
18529        #[allow(unused_comparisons)]
18530        if __tmp.remaining() < Self::ENCODED_LEN {
18531            panic!(
18532                "buffer is too small (need {} bytes, but got {})",
18533                Self::ENCODED_LEN,
18534                __tmp.remaining(),
18535            )
18536        }
18537        __tmp.put_u32_le(self.ofs);
18538        __tmp.put_u32_le(self.count);
18539        __tmp.put_u16_le(self.id);
18540        __tmp.put_u8(self.target_system);
18541        __tmp.put_u8(self.target_component);
18542        if matches!(version, MavlinkVersion::V2) {
18543            let len = __tmp.len();
18544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18545        } else {
18546            __tmp.len()
18547        }
18548    }
18549}
18550#[doc = "id: 122"]
18551#[doc = "Stop log transfer and resume normal logging."]
18552#[derive(Debug, Clone, PartialEq)]
18553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18555pub struct LOG_REQUEST_END_DATA {
18556    #[doc = "System ID"]
18557    pub target_system: u8,
18558    #[doc = "Component ID"]
18559    pub target_component: u8,
18560}
18561impl LOG_REQUEST_END_DATA {
18562    pub const ENCODED_LEN: usize = 2usize;
18563    pub const DEFAULT: Self = Self {
18564        target_system: 0_u8,
18565        target_component: 0_u8,
18566    };
18567    #[cfg(feature = "arbitrary")]
18568    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18569        use arbitrary::{Arbitrary, Unstructured};
18570        let mut buf = [0u8; 1024];
18571        rng.fill_bytes(&mut buf);
18572        let mut unstructured = Unstructured::new(&buf);
18573        Self::arbitrary(&mut unstructured).unwrap_or_default()
18574    }
18575}
18576impl Default for LOG_REQUEST_END_DATA {
18577    fn default() -> Self {
18578        Self::DEFAULT.clone()
18579    }
18580}
18581impl MessageData for LOG_REQUEST_END_DATA {
18582    type Message = MavMessage;
18583    const ID: u32 = 122u32;
18584    const NAME: &'static str = "LOG_REQUEST_END";
18585    const EXTRA_CRC: u8 = 203u8;
18586    const ENCODED_LEN: usize = 2usize;
18587    fn deser(
18588        _version: MavlinkVersion,
18589        __input: &[u8],
18590    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18591        let avail_len = __input.len();
18592        let mut payload_buf = [0; Self::ENCODED_LEN];
18593        let mut buf = if avail_len < Self::ENCODED_LEN {
18594            payload_buf[0..avail_len].copy_from_slice(__input);
18595            Bytes::new(&payload_buf)
18596        } else {
18597            Bytes::new(__input)
18598        };
18599        let mut __struct = Self::default();
18600        __struct.target_system = buf.get_u8();
18601        __struct.target_component = buf.get_u8();
18602        Ok(__struct)
18603    }
18604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18605        let mut __tmp = BytesMut::new(bytes);
18606        #[allow(clippy::absurd_extreme_comparisons)]
18607        #[allow(unused_comparisons)]
18608        if __tmp.remaining() < Self::ENCODED_LEN {
18609            panic!(
18610                "buffer is too small (need {} bytes, but got {})",
18611                Self::ENCODED_LEN,
18612                __tmp.remaining(),
18613            )
18614        }
18615        __tmp.put_u8(self.target_system);
18616        __tmp.put_u8(self.target_component);
18617        if matches!(version, MavlinkVersion::V2) {
18618            let len = __tmp.len();
18619            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18620        } else {
18621            __tmp.len()
18622        }
18623    }
18624}
18625#[doc = "id: 117"]
18626#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18627#[derive(Debug, Clone, PartialEq)]
18628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18630pub struct LOG_REQUEST_LIST_DATA {
18631    #[doc = "First log id (0 for first available)"]
18632    pub start: u16,
18633    #[doc = "Last log id (0xffff for last available)"]
18634    pub end: u16,
18635    #[doc = "System ID"]
18636    pub target_system: u8,
18637    #[doc = "Component ID"]
18638    pub target_component: u8,
18639}
18640impl LOG_REQUEST_LIST_DATA {
18641    pub const ENCODED_LEN: usize = 6usize;
18642    pub const DEFAULT: Self = Self {
18643        start: 0_u16,
18644        end: 0_u16,
18645        target_system: 0_u8,
18646        target_component: 0_u8,
18647    };
18648    #[cfg(feature = "arbitrary")]
18649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18650        use arbitrary::{Arbitrary, Unstructured};
18651        let mut buf = [0u8; 1024];
18652        rng.fill_bytes(&mut buf);
18653        let mut unstructured = Unstructured::new(&buf);
18654        Self::arbitrary(&mut unstructured).unwrap_or_default()
18655    }
18656}
18657impl Default for LOG_REQUEST_LIST_DATA {
18658    fn default() -> Self {
18659        Self::DEFAULT.clone()
18660    }
18661}
18662impl MessageData for LOG_REQUEST_LIST_DATA {
18663    type Message = MavMessage;
18664    const ID: u32 = 117u32;
18665    const NAME: &'static str = "LOG_REQUEST_LIST";
18666    const EXTRA_CRC: u8 = 128u8;
18667    const ENCODED_LEN: usize = 6usize;
18668    fn deser(
18669        _version: MavlinkVersion,
18670        __input: &[u8],
18671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18672        let avail_len = __input.len();
18673        let mut payload_buf = [0; Self::ENCODED_LEN];
18674        let mut buf = if avail_len < Self::ENCODED_LEN {
18675            payload_buf[0..avail_len].copy_from_slice(__input);
18676            Bytes::new(&payload_buf)
18677        } else {
18678            Bytes::new(__input)
18679        };
18680        let mut __struct = Self::default();
18681        __struct.start = buf.get_u16_le();
18682        __struct.end = buf.get_u16_le();
18683        __struct.target_system = buf.get_u8();
18684        __struct.target_component = buf.get_u8();
18685        Ok(__struct)
18686    }
18687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18688        let mut __tmp = BytesMut::new(bytes);
18689        #[allow(clippy::absurd_extreme_comparisons)]
18690        #[allow(unused_comparisons)]
18691        if __tmp.remaining() < Self::ENCODED_LEN {
18692            panic!(
18693                "buffer is too small (need {} bytes, but got {})",
18694                Self::ENCODED_LEN,
18695                __tmp.remaining(),
18696            )
18697        }
18698        __tmp.put_u16_le(self.start);
18699        __tmp.put_u16_le(self.end);
18700        __tmp.put_u8(self.target_system);
18701        __tmp.put_u8(self.target_component);
18702        if matches!(version, MavlinkVersion::V2) {
18703            let len = __tmp.len();
18704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18705        } else {
18706            __tmp.len()
18707        }
18708    }
18709}
18710#[doc = "id: 192"]
18711#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18712#[derive(Debug, Clone, PartialEq)]
18713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18715pub struct MAG_CAL_REPORT_DATA {
18716    #[doc = "RMS milligauss residuals."]
18717    pub fitness: f32,
18718    #[doc = "X offset."]
18719    pub ofs_x: f32,
18720    #[doc = "Y offset."]
18721    pub ofs_y: f32,
18722    #[doc = "Z offset."]
18723    pub ofs_z: f32,
18724    #[doc = "X diagonal (matrix 11)."]
18725    pub diag_x: f32,
18726    #[doc = "Y diagonal (matrix 22)."]
18727    pub diag_y: f32,
18728    #[doc = "Z diagonal (matrix 33)."]
18729    pub diag_z: f32,
18730    #[doc = "X off-diagonal (matrix 12 and 21)."]
18731    pub offdiag_x: f32,
18732    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18733    pub offdiag_y: f32,
18734    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18735    pub offdiag_z: f32,
18736    #[doc = "Compass being calibrated."]
18737    pub compass_id: u8,
18738    #[doc = "Bitmask of compasses being calibrated."]
18739    pub cal_mask: u8,
18740    #[doc = "Calibration Status."]
18741    pub cal_status: MagCalStatus,
18742    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18743    pub autosaved: u8,
18744    #[doc = "Confidence in orientation (higher is better)."]
18745    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18746    pub orientation_confidence: f32,
18747    #[doc = "orientation before calibration."]
18748    #[cfg_attr(feature = "serde", serde(default))]
18749    pub old_orientation: MavSensorOrientation,
18750    #[doc = "orientation after calibration."]
18751    #[cfg_attr(feature = "serde", serde(default))]
18752    pub new_orientation: MavSensorOrientation,
18753    #[doc = "field radius correction factor"]
18754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18755    pub scale_factor: f32,
18756}
18757impl MAG_CAL_REPORT_DATA {
18758    pub const ENCODED_LEN: usize = 54usize;
18759    pub const DEFAULT: Self = Self {
18760        fitness: 0.0_f32,
18761        ofs_x: 0.0_f32,
18762        ofs_y: 0.0_f32,
18763        ofs_z: 0.0_f32,
18764        diag_x: 0.0_f32,
18765        diag_y: 0.0_f32,
18766        diag_z: 0.0_f32,
18767        offdiag_x: 0.0_f32,
18768        offdiag_y: 0.0_f32,
18769        offdiag_z: 0.0_f32,
18770        compass_id: 0_u8,
18771        cal_mask: 0_u8,
18772        cal_status: MagCalStatus::DEFAULT,
18773        autosaved: 0_u8,
18774        orientation_confidence: 0.0_f32,
18775        old_orientation: MavSensorOrientation::DEFAULT,
18776        new_orientation: MavSensorOrientation::DEFAULT,
18777        scale_factor: 0.0_f32,
18778    };
18779    #[cfg(feature = "arbitrary")]
18780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18781        use arbitrary::{Arbitrary, Unstructured};
18782        let mut buf = [0u8; 1024];
18783        rng.fill_bytes(&mut buf);
18784        let mut unstructured = Unstructured::new(&buf);
18785        Self::arbitrary(&mut unstructured).unwrap_or_default()
18786    }
18787}
18788impl Default for MAG_CAL_REPORT_DATA {
18789    fn default() -> Self {
18790        Self::DEFAULT.clone()
18791    }
18792}
18793impl MessageData for MAG_CAL_REPORT_DATA {
18794    type Message = MavMessage;
18795    const ID: u32 = 192u32;
18796    const NAME: &'static str = "MAG_CAL_REPORT";
18797    const EXTRA_CRC: u8 = 36u8;
18798    const ENCODED_LEN: usize = 54usize;
18799    fn deser(
18800        _version: MavlinkVersion,
18801        __input: &[u8],
18802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18803        let avail_len = __input.len();
18804        let mut payload_buf = [0; Self::ENCODED_LEN];
18805        let mut buf = if avail_len < Self::ENCODED_LEN {
18806            payload_buf[0..avail_len].copy_from_slice(__input);
18807            Bytes::new(&payload_buf)
18808        } else {
18809            Bytes::new(__input)
18810        };
18811        let mut __struct = Self::default();
18812        __struct.fitness = buf.get_f32_le();
18813        __struct.ofs_x = buf.get_f32_le();
18814        __struct.ofs_y = buf.get_f32_le();
18815        __struct.ofs_z = buf.get_f32_le();
18816        __struct.diag_x = buf.get_f32_le();
18817        __struct.diag_y = buf.get_f32_le();
18818        __struct.diag_z = buf.get_f32_le();
18819        __struct.offdiag_x = buf.get_f32_le();
18820        __struct.offdiag_y = buf.get_f32_le();
18821        __struct.offdiag_z = buf.get_f32_le();
18822        __struct.compass_id = buf.get_u8();
18823        __struct.cal_mask = buf.get_u8();
18824        let tmp = buf.get_u8();
18825        __struct.cal_status =
18826            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18827                enum_type: "MagCalStatus",
18828                value: tmp as u32,
18829            })?;
18830        __struct.autosaved = buf.get_u8();
18831        __struct.orientation_confidence = buf.get_f32_le();
18832        let tmp = buf.get_u8();
18833        __struct.old_orientation =
18834            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18835                enum_type: "MavSensorOrientation",
18836                value: tmp as u32,
18837            })?;
18838        let tmp = buf.get_u8();
18839        __struct.new_orientation =
18840            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18841                enum_type: "MavSensorOrientation",
18842                value: tmp as u32,
18843            })?;
18844        __struct.scale_factor = buf.get_f32_le();
18845        Ok(__struct)
18846    }
18847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18848        let mut __tmp = BytesMut::new(bytes);
18849        #[allow(clippy::absurd_extreme_comparisons)]
18850        #[allow(unused_comparisons)]
18851        if __tmp.remaining() < Self::ENCODED_LEN {
18852            panic!(
18853                "buffer is too small (need {} bytes, but got {})",
18854                Self::ENCODED_LEN,
18855                __tmp.remaining(),
18856            )
18857        }
18858        __tmp.put_f32_le(self.fitness);
18859        __tmp.put_f32_le(self.ofs_x);
18860        __tmp.put_f32_le(self.ofs_y);
18861        __tmp.put_f32_le(self.ofs_z);
18862        __tmp.put_f32_le(self.diag_x);
18863        __tmp.put_f32_le(self.diag_y);
18864        __tmp.put_f32_le(self.diag_z);
18865        __tmp.put_f32_le(self.offdiag_x);
18866        __tmp.put_f32_le(self.offdiag_y);
18867        __tmp.put_f32_le(self.offdiag_z);
18868        __tmp.put_u8(self.compass_id);
18869        __tmp.put_u8(self.cal_mask);
18870        __tmp.put_u8(self.cal_status as u8);
18871        __tmp.put_u8(self.autosaved);
18872        __tmp.put_f32_le(self.orientation_confidence);
18873        __tmp.put_u8(self.old_orientation as u8);
18874        __tmp.put_u8(self.new_orientation as u8);
18875        __tmp.put_f32_le(self.scale_factor);
18876        if matches!(version, MavlinkVersion::V2) {
18877            let len = __tmp.len();
18878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18879        } else {
18880            __tmp.len()
18881        }
18882    }
18883}
18884#[doc = "id: 69"]
18885#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18886#[derive(Debug, Clone, PartialEq)]
18887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18888#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18889pub struct MANUAL_CONTROL_DATA {
18890    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18891    pub x: i16,
18892    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18893    pub y: i16,
18894    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18895    pub z: i16,
18896    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18897    pub r: i16,
18898    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18899    pub buttons: u16,
18900    #[doc = "The system to be controlled."]
18901    pub target: u8,
18902    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18903    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18904    pub buttons2: u16,
18905    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18906    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18907    pub enabled_extensions: u8,
18908    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18909    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18910    pub s: i16,
18911    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18912    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18913    pub t: i16,
18914    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18915    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18916    pub aux1: i16,
18917    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18919    pub aux2: i16,
18920    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18922    pub aux3: i16,
18923    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18925    pub aux4: i16,
18926    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18928    pub aux5: i16,
18929    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18931    pub aux6: i16,
18932}
18933impl MANUAL_CONTROL_DATA {
18934    pub const ENCODED_LEN: usize = 30usize;
18935    pub const DEFAULT: Self = Self {
18936        x: 0_i16,
18937        y: 0_i16,
18938        z: 0_i16,
18939        r: 0_i16,
18940        buttons: 0_u16,
18941        target: 0_u8,
18942        buttons2: 0_u16,
18943        enabled_extensions: 0_u8,
18944        s: 0_i16,
18945        t: 0_i16,
18946        aux1: 0_i16,
18947        aux2: 0_i16,
18948        aux3: 0_i16,
18949        aux4: 0_i16,
18950        aux5: 0_i16,
18951        aux6: 0_i16,
18952    };
18953    #[cfg(feature = "arbitrary")]
18954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18955        use arbitrary::{Arbitrary, Unstructured};
18956        let mut buf = [0u8; 1024];
18957        rng.fill_bytes(&mut buf);
18958        let mut unstructured = Unstructured::new(&buf);
18959        Self::arbitrary(&mut unstructured).unwrap_or_default()
18960    }
18961}
18962impl Default for MANUAL_CONTROL_DATA {
18963    fn default() -> Self {
18964        Self::DEFAULT.clone()
18965    }
18966}
18967impl MessageData for MANUAL_CONTROL_DATA {
18968    type Message = MavMessage;
18969    const ID: u32 = 69u32;
18970    const NAME: &'static str = "MANUAL_CONTROL";
18971    const EXTRA_CRC: u8 = 243u8;
18972    const ENCODED_LEN: usize = 30usize;
18973    fn deser(
18974        _version: MavlinkVersion,
18975        __input: &[u8],
18976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18977        let avail_len = __input.len();
18978        let mut payload_buf = [0; Self::ENCODED_LEN];
18979        let mut buf = if avail_len < Self::ENCODED_LEN {
18980            payload_buf[0..avail_len].copy_from_slice(__input);
18981            Bytes::new(&payload_buf)
18982        } else {
18983            Bytes::new(__input)
18984        };
18985        let mut __struct = Self::default();
18986        __struct.x = buf.get_i16_le();
18987        __struct.y = buf.get_i16_le();
18988        __struct.z = buf.get_i16_le();
18989        __struct.r = buf.get_i16_le();
18990        __struct.buttons = buf.get_u16_le();
18991        __struct.target = buf.get_u8();
18992        __struct.buttons2 = buf.get_u16_le();
18993        __struct.enabled_extensions = buf.get_u8();
18994        __struct.s = buf.get_i16_le();
18995        __struct.t = buf.get_i16_le();
18996        __struct.aux1 = buf.get_i16_le();
18997        __struct.aux2 = buf.get_i16_le();
18998        __struct.aux3 = buf.get_i16_le();
18999        __struct.aux4 = buf.get_i16_le();
19000        __struct.aux5 = buf.get_i16_le();
19001        __struct.aux6 = buf.get_i16_le();
19002        Ok(__struct)
19003    }
19004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19005        let mut __tmp = BytesMut::new(bytes);
19006        #[allow(clippy::absurd_extreme_comparisons)]
19007        #[allow(unused_comparisons)]
19008        if __tmp.remaining() < Self::ENCODED_LEN {
19009            panic!(
19010                "buffer is too small (need {} bytes, but got {})",
19011                Self::ENCODED_LEN,
19012                __tmp.remaining(),
19013            )
19014        }
19015        __tmp.put_i16_le(self.x);
19016        __tmp.put_i16_le(self.y);
19017        __tmp.put_i16_le(self.z);
19018        __tmp.put_i16_le(self.r);
19019        __tmp.put_u16_le(self.buttons);
19020        __tmp.put_u8(self.target);
19021        __tmp.put_u16_le(self.buttons2);
19022        __tmp.put_u8(self.enabled_extensions);
19023        __tmp.put_i16_le(self.s);
19024        __tmp.put_i16_le(self.t);
19025        __tmp.put_i16_le(self.aux1);
19026        __tmp.put_i16_le(self.aux2);
19027        __tmp.put_i16_le(self.aux3);
19028        __tmp.put_i16_le(self.aux4);
19029        __tmp.put_i16_le(self.aux5);
19030        __tmp.put_i16_le(self.aux6);
19031        if matches!(version, MavlinkVersion::V2) {
19032            let len = __tmp.len();
19033            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19034        } else {
19035            __tmp.len()
19036        }
19037    }
19038}
19039#[doc = "id: 81"]
19040#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19041#[derive(Debug, Clone, PartialEq)]
19042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19044pub struct MANUAL_SETPOINT_DATA {
19045    #[doc = "Timestamp (time since system boot)."]
19046    pub time_boot_ms: u32,
19047    #[doc = "Desired roll rate"]
19048    pub roll: f32,
19049    #[doc = "Desired pitch rate"]
19050    pub pitch: f32,
19051    #[doc = "Desired yaw rate"]
19052    pub yaw: f32,
19053    #[doc = "Collective thrust, normalized to 0 .. 1"]
19054    pub thrust: f32,
19055    #[doc = "Flight mode switch position, 0.. 255"]
19056    pub mode_switch: u8,
19057    #[doc = "Override mode switch position, 0.. 255"]
19058    pub manual_override_switch: u8,
19059}
19060impl MANUAL_SETPOINT_DATA {
19061    pub const ENCODED_LEN: usize = 22usize;
19062    pub const DEFAULT: Self = Self {
19063        time_boot_ms: 0_u32,
19064        roll: 0.0_f32,
19065        pitch: 0.0_f32,
19066        yaw: 0.0_f32,
19067        thrust: 0.0_f32,
19068        mode_switch: 0_u8,
19069        manual_override_switch: 0_u8,
19070    };
19071    #[cfg(feature = "arbitrary")]
19072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19073        use arbitrary::{Arbitrary, Unstructured};
19074        let mut buf = [0u8; 1024];
19075        rng.fill_bytes(&mut buf);
19076        let mut unstructured = Unstructured::new(&buf);
19077        Self::arbitrary(&mut unstructured).unwrap_or_default()
19078    }
19079}
19080impl Default for MANUAL_SETPOINT_DATA {
19081    fn default() -> Self {
19082        Self::DEFAULT.clone()
19083    }
19084}
19085impl MessageData for MANUAL_SETPOINT_DATA {
19086    type Message = MavMessage;
19087    const ID: u32 = 81u32;
19088    const NAME: &'static str = "MANUAL_SETPOINT";
19089    const EXTRA_CRC: u8 = 106u8;
19090    const ENCODED_LEN: usize = 22usize;
19091    fn deser(
19092        _version: MavlinkVersion,
19093        __input: &[u8],
19094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19095        let avail_len = __input.len();
19096        let mut payload_buf = [0; Self::ENCODED_LEN];
19097        let mut buf = if avail_len < Self::ENCODED_LEN {
19098            payload_buf[0..avail_len].copy_from_slice(__input);
19099            Bytes::new(&payload_buf)
19100        } else {
19101            Bytes::new(__input)
19102        };
19103        let mut __struct = Self::default();
19104        __struct.time_boot_ms = buf.get_u32_le();
19105        __struct.roll = buf.get_f32_le();
19106        __struct.pitch = buf.get_f32_le();
19107        __struct.yaw = buf.get_f32_le();
19108        __struct.thrust = buf.get_f32_le();
19109        __struct.mode_switch = buf.get_u8();
19110        __struct.manual_override_switch = buf.get_u8();
19111        Ok(__struct)
19112    }
19113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19114        let mut __tmp = BytesMut::new(bytes);
19115        #[allow(clippy::absurd_extreme_comparisons)]
19116        #[allow(unused_comparisons)]
19117        if __tmp.remaining() < Self::ENCODED_LEN {
19118            panic!(
19119                "buffer is too small (need {} bytes, but got {})",
19120                Self::ENCODED_LEN,
19121                __tmp.remaining(),
19122            )
19123        }
19124        __tmp.put_u32_le(self.time_boot_ms);
19125        __tmp.put_f32_le(self.roll);
19126        __tmp.put_f32_le(self.pitch);
19127        __tmp.put_f32_le(self.yaw);
19128        __tmp.put_f32_le(self.thrust);
19129        __tmp.put_u8(self.mode_switch);
19130        __tmp.put_u8(self.manual_override_switch);
19131        if matches!(version, MavlinkVersion::V2) {
19132            let len = __tmp.len();
19133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19134        } else {
19135            __tmp.len()
19136        }
19137    }
19138}
19139#[doc = "id: 249"]
19140#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19141#[derive(Debug, Clone, PartialEq)]
19142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19144pub struct MEMORY_VECT_DATA {
19145    #[doc = "Starting address of the debug variables"]
19146    pub address: u16,
19147    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19148    pub ver: u8,
19149    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19150    pub mavtype: u8,
19151    #[doc = "Memory contents at specified address"]
19152    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19153    pub value: [i8; 32],
19154}
19155impl MEMORY_VECT_DATA {
19156    pub const ENCODED_LEN: usize = 36usize;
19157    pub const DEFAULT: Self = Self {
19158        address: 0_u16,
19159        ver: 0_u8,
19160        mavtype: 0_u8,
19161        value: [0_i8; 32usize],
19162    };
19163    #[cfg(feature = "arbitrary")]
19164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19165        use arbitrary::{Arbitrary, Unstructured};
19166        let mut buf = [0u8; 1024];
19167        rng.fill_bytes(&mut buf);
19168        let mut unstructured = Unstructured::new(&buf);
19169        Self::arbitrary(&mut unstructured).unwrap_or_default()
19170    }
19171}
19172impl Default for MEMORY_VECT_DATA {
19173    fn default() -> Self {
19174        Self::DEFAULT.clone()
19175    }
19176}
19177impl MessageData for MEMORY_VECT_DATA {
19178    type Message = MavMessage;
19179    const ID: u32 = 249u32;
19180    const NAME: &'static str = "MEMORY_VECT";
19181    const EXTRA_CRC: u8 = 204u8;
19182    const ENCODED_LEN: usize = 36usize;
19183    fn deser(
19184        _version: MavlinkVersion,
19185        __input: &[u8],
19186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19187        let avail_len = __input.len();
19188        let mut payload_buf = [0; Self::ENCODED_LEN];
19189        let mut buf = if avail_len < Self::ENCODED_LEN {
19190            payload_buf[0..avail_len].copy_from_slice(__input);
19191            Bytes::new(&payload_buf)
19192        } else {
19193            Bytes::new(__input)
19194        };
19195        let mut __struct = Self::default();
19196        __struct.address = buf.get_u16_le();
19197        __struct.ver = buf.get_u8();
19198        __struct.mavtype = buf.get_u8();
19199        for v in &mut __struct.value {
19200            let val = buf.get_i8();
19201            *v = val;
19202        }
19203        Ok(__struct)
19204    }
19205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19206        let mut __tmp = BytesMut::new(bytes);
19207        #[allow(clippy::absurd_extreme_comparisons)]
19208        #[allow(unused_comparisons)]
19209        if __tmp.remaining() < Self::ENCODED_LEN {
19210            panic!(
19211                "buffer is too small (need {} bytes, but got {})",
19212                Self::ENCODED_LEN,
19213                __tmp.remaining(),
19214            )
19215        }
19216        __tmp.put_u16_le(self.address);
19217        __tmp.put_u8(self.ver);
19218        __tmp.put_u8(self.mavtype);
19219        for val in &self.value {
19220            __tmp.put_i8(*val);
19221        }
19222        if matches!(version, MavlinkVersion::V2) {
19223            let len = __tmp.len();
19224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19225        } else {
19226            __tmp.len()
19227        }
19228    }
19229}
19230#[doc = "id: 244"]
19231#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19232#[derive(Debug, Clone, PartialEq)]
19233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19235pub struct MESSAGE_INTERVAL_DATA {
19236    #[doc = "0 indicates the interval at which it is sent."]
19237    pub interval_us: i32,
19238    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19239    pub message_id: u16,
19240}
19241impl MESSAGE_INTERVAL_DATA {
19242    pub const ENCODED_LEN: usize = 6usize;
19243    pub const DEFAULT: Self = Self {
19244        interval_us: 0_i32,
19245        message_id: 0_u16,
19246    };
19247    #[cfg(feature = "arbitrary")]
19248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19249        use arbitrary::{Arbitrary, Unstructured};
19250        let mut buf = [0u8; 1024];
19251        rng.fill_bytes(&mut buf);
19252        let mut unstructured = Unstructured::new(&buf);
19253        Self::arbitrary(&mut unstructured).unwrap_or_default()
19254    }
19255}
19256impl Default for MESSAGE_INTERVAL_DATA {
19257    fn default() -> Self {
19258        Self::DEFAULT.clone()
19259    }
19260}
19261impl MessageData for MESSAGE_INTERVAL_DATA {
19262    type Message = MavMessage;
19263    const ID: u32 = 244u32;
19264    const NAME: &'static str = "MESSAGE_INTERVAL";
19265    const EXTRA_CRC: u8 = 95u8;
19266    const ENCODED_LEN: usize = 6usize;
19267    fn deser(
19268        _version: MavlinkVersion,
19269        __input: &[u8],
19270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19271        let avail_len = __input.len();
19272        let mut payload_buf = [0; Self::ENCODED_LEN];
19273        let mut buf = if avail_len < Self::ENCODED_LEN {
19274            payload_buf[0..avail_len].copy_from_slice(__input);
19275            Bytes::new(&payload_buf)
19276        } else {
19277            Bytes::new(__input)
19278        };
19279        let mut __struct = Self::default();
19280        __struct.interval_us = buf.get_i32_le();
19281        __struct.message_id = buf.get_u16_le();
19282        Ok(__struct)
19283    }
19284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19285        let mut __tmp = BytesMut::new(bytes);
19286        #[allow(clippy::absurd_extreme_comparisons)]
19287        #[allow(unused_comparisons)]
19288        if __tmp.remaining() < Self::ENCODED_LEN {
19289            panic!(
19290                "buffer is too small (need {} bytes, but got {})",
19291                Self::ENCODED_LEN,
19292                __tmp.remaining(),
19293            )
19294        }
19295        __tmp.put_i32_le(self.interval_us);
19296        __tmp.put_u16_le(self.message_id);
19297        if matches!(version, MavlinkVersion::V2) {
19298            let len = __tmp.len();
19299            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19300        } else {
19301            __tmp.len()
19302        }
19303    }
19304}
19305#[doc = "id: 47"]
19306#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19307#[derive(Debug, Clone, PartialEq)]
19308#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19309#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19310pub struct MISSION_ACK_DATA {
19311    #[doc = "System ID"]
19312    pub target_system: u8,
19313    #[doc = "Component ID"]
19314    pub target_component: u8,
19315    #[doc = "Mission result."]
19316    pub mavtype: MavMissionResult,
19317    #[doc = "Mission type."]
19318    #[cfg_attr(feature = "serde", serde(default))]
19319    pub mission_type: MavMissionType,
19320    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19321    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19322    pub opaque_id: u32,
19323}
19324impl MISSION_ACK_DATA {
19325    pub const ENCODED_LEN: usize = 8usize;
19326    pub const DEFAULT: Self = Self {
19327        target_system: 0_u8,
19328        target_component: 0_u8,
19329        mavtype: MavMissionResult::DEFAULT,
19330        mission_type: MavMissionType::DEFAULT,
19331        opaque_id: 0_u32,
19332    };
19333    #[cfg(feature = "arbitrary")]
19334    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19335        use arbitrary::{Arbitrary, Unstructured};
19336        let mut buf = [0u8; 1024];
19337        rng.fill_bytes(&mut buf);
19338        let mut unstructured = Unstructured::new(&buf);
19339        Self::arbitrary(&mut unstructured).unwrap_or_default()
19340    }
19341}
19342impl Default for MISSION_ACK_DATA {
19343    fn default() -> Self {
19344        Self::DEFAULT.clone()
19345    }
19346}
19347impl MessageData for MISSION_ACK_DATA {
19348    type Message = MavMessage;
19349    const ID: u32 = 47u32;
19350    const NAME: &'static str = "MISSION_ACK";
19351    const EXTRA_CRC: u8 = 153u8;
19352    const ENCODED_LEN: usize = 8usize;
19353    fn deser(
19354        _version: MavlinkVersion,
19355        __input: &[u8],
19356    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19357        let avail_len = __input.len();
19358        let mut payload_buf = [0; Self::ENCODED_LEN];
19359        let mut buf = if avail_len < Self::ENCODED_LEN {
19360            payload_buf[0..avail_len].copy_from_slice(__input);
19361            Bytes::new(&payload_buf)
19362        } else {
19363            Bytes::new(__input)
19364        };
19365        let mut __struct = Self::default();
19366        __struct.target_system = buf.get_u8();
19367        __struct.target_component = buf.get_u8();
19368        let tmp = buf.get_u8();
19369        __struct.mavtype =
19370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19371                enum_type: "MavMissionResult",
19372                value: tmp as u32,
19373            })?;
19374        let tmp = buf.get_u8();
19375        __struct.mission_type =
19376            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19377                enum_type: "MavMissionType",
19378                value: tmp as u32,
19379            })?;
19380        __struct.opaque_id = buf.get_u32_le();
19381        Ok(__struct)
19382    }
19383    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19384        let mut __tmp = BytesMut::new(bytes);
19385        #[allow(clippy::absurd_extreme_comparisons)]
19386        #[allow(unused_comparisons)]
19387        if __tmp.remaining() < Self::ENCODED_LEN {
19388            panic!(
19389                "buffer is too small (need {} bytes, but got {})",
19390                Self::ENCODED_LEN,
19391                __tmp.remaining(),
19392            )
19393        }
19394        __tmp.put_u8(self.target_system);
19395        __tmp.put_u8(self.target_component);
19396        __tmp.put_u8(self.mavtype as u8);
19397        __tmp.put_u8(self.mission_type as u8);
19398        __tmp.put_u32_le(self.opaque_id);
19399        if matches!(version, MavlinkVersion::V2) {
19400            let len = __tmp.len();
19401            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19402        } else {
19403            __tmp.len()
19404        }
19405    }
19406}
19407#[doc = "id: 45"]
19408#[doc = "Delete all mission items at once."]
19409#[derive(Debug, Clone, PartialEq)]
19410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19411#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19412pub struct MISSION_CLEAR_ALL_DATA {
19413    #[doc = "System ID"]
19414    pub target_system: u8,
19415    #[doc = "Component ID"]
19416    pub target_component: u8,
19417    #[doc = "Mission type."]
19418    #[cfg_attr(feature = "serde", serde(default))]
19419    pub mission_type: MavMissionType,
19420}
19421impl MISSION_CLEAR_ALL_DATA {
19422    pub const ENCODED_LEN: usize = 3usize;
19423    pub const DEFAULT: Self = Self {
19424        target_system: 0_u8,
19425        target_component: 0_u8,
19426        mission_type: MavMissionType::DEFAULT,
19427    };
19428    #[cfg(feature = "arbitrary")]
19429    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19430        use arbitrary::{Arbitrary, Unstructured};
19431        let mut buf = [0u8; 1024];
19432        rng.fill_bytes(&mut buf);
19433        let mut unstructured = Unstructured::new(&buf);
19434        Self::arbitrary(&mut unstructured).unwrap_or_default()
19435    }
19436}
19437impl Default for MISSION_CLEAR_ALL_DATA {
19438    fn default() -> Self {
19439        Self::DEFAULT.clone()
19440    }
19441}
19442impl MessageData for MISSION_CLEAR_ALL_DATA {
19443    type Message = MavMessage;
19444    const ID: u32 = 45u32;
19445    const NAME: &'static str = "MISSION_CLEAR_ALL";
19446    const EXTRA_CRC: u8 = 232u8;
19447    const ENCODED_LEN: usize = 3usize;
19448    fn deser(
19449        _version: MavlinkVersion,
19450        __input: &[u8],
19451    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19452        let avail_len = __input.len();
19453        let mut payload_buf = [0; Self::ENCODED_LEN];
19454        let mut buf = if avail_len < Self::ENCODED_LEN {
19455            payload_buf[0..avail_len].copy_from_slice(__input);
19456            Bytes::new(&payload_buf)
19457        } else {
19458            Bytes::new(__input)
19459        };
19460        let mut __struct = Self::default();
19461        __struct.target_system = buf.get_u8();
19462        __struct.target_component = buf.get_u8();
19463        let tmp = buf.get_u8();
19464        __struct.mission_type =
19465            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19466                enum_type: "MavMissionType",
19467                value: tmp as u32,
19468            })?;
19469        Ok(__struct)
19470    }
19471    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19472        let mut __tmp = BytesMut::new(bytes);
19473        #[allow(clippy::absurd_extreme_comparisons)]
19474        #[allow(unused_comparisons)]
19475        if __tmp.remaining() < Self::ENCODED_LEN {
19476            panic!(
19477                "buffer is too small (need {} bytes, but got {})",
19478                Self::ENCODED_LEN,
19479                __tmp.remaining(),
19480            )
19481        }
19482        __tmp.put_u8(self.target_system);
19483        __tmp.put_u8(self.target_component);
19484        __tmp.put_u8(self.mission_type as u8);
19485        if matches!(version, MavlinkVersion::V2) {
19486            let len = __tmp.len();
19487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19488        } else {
19489            __tmp.len()
19490        }
19491    }
19492}
19493#[doc = "id: 44"]
19494#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19495#[derive(Debug, Clone, PartialEq)]
19496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19498pub struct MISSION_COUNT_DATA {
19499    #[doc = "Number of mission items in the sequence"]
19500    pub count: u16,
19501    #[doc = "System ID"]
19502    pub target_system: u8,
19503    #[doc = "Component ID"]
19504    pub target_component: u8,
19505    #[doc = "Mission type."]
19506    #[cfg_attr(feature = "serde", serde(default))]
19507    pub mission_type: MavMissionType,
19508    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19510    pub opaque_id: u32,
19511}
19512impl MISSION_COUNT_DATA {
19513    pub const ENCODED_LEN: usize = 9usize;
19514    pub const DEFAULT: Self = Self {
19515        count: 0_u16,
19516        target_system: 0_u8,
19517        target_component: 0_u8,
19518        mission_type: MavMissionType::DEFAULT,
19519        opaque_id: 0_u32,
19520    };
19521    #[cfg(feature = "arbitrary")]
19522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19523        use arbitrary::{Arbitrary, Unstructured};
19524        let mut buf = [0u8; 1024];
19525        rng.fill_bytes(&mut buf);
19526        let mut unstructured = Unstructured::new(&buf);
19527        Self::arbitrary(&mut unstructured).unwrap_or_default()
19528    }
19529}
19530impl Default for MISSION_COUNT_DATA {
19531    fn default() -> Self {
19532        Self::DEFAULT.clone()
19533    }
19534}
19535impl MessageData for MISSION_COUNT_DATA {
19536    type Message = MavMessage;
19537    const ID: u32 = 44u32;
19538    const NAME: &'static str = "MISSION_COUNT";
19539    const EXTRA_CRC: u8 = 221u8;
19540    const ENCODED_LEN: usize = 9usize;
19541    fn deser(
19542        _version: MavlinkVersion,
19543        __input: &[u8],
19544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19545        let avail_len = __input.len();
19546        let mut payload_buf = [0; Self::ENCODED_LEN];
19547        let mut buf = if avail_len < Self::ENCODED_LEN {
19548            payload_buf[0..avail_len].copy_from_slice(__input);
19549            Bytes::new(&payload_buf)
19550        } else {
19551            Bytes::new(__input)
19552        };
19553        let mut __struct = Self::default();
19554        __struct.count = buf.get_u16_le();
19555        __struct.target_system = buf.get_u8();
19556        __struct.target_component = buf.get_u8();
19557        let tmp = buf.get_u8();
19558        __struct.mission_type =
19559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19560                enum_type: "MavMissionType",
19561                value: tmp as u32,
19562            })?;
19563        __struct.opaque_id = buf.get_u32_le();
19564        Ok(__struct)
19565    }
19566    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19567        let mut __tmp = BytesMut::new(bytes);
19568        #[allow(clippy::absurd_extreme_comparisons)]
19569        #[allow(unused_comparisons)]
19570        if __tmp.remaining() < Self::ENCODED_LEN {
19571            panic!(
19572                "buffer is too small (need {} bytes, but got {})",
19573                Self::ENCODED_LEN,
19574                __tmp.remaining(),
19575            )
19576        }
19577        __tmp.put_u16_le(self.count);
19578        __tmp.put_u8(self.target_system);
19579        __tmp.put_u8(self.target_component);
19580        __tmp.put_u8(self.mission_type as u8);
19581        __tmp.put_u32_le(self.opaque_id);
19582        if matches!(version, MavlinkVersion::V2) {
19583            let len = __tmp.len();
19584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19585        } else {
19586            __tmp.len()
19587        }
19588    }
19589}
19590#[doc = "id: 42"]
19591#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19592#[derive(Debug, Clone, PartialEq)]
19593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19595pub struct MISSION_CURRENT_DATA {
19596    #[doc = "Sequence"]
19597    pub seq: u16,
19598    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19600    pub total: u16,
19601    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19602    #[cfg_attr(feature = "serde", serde(default))]
19603    pub mission_state: MissionState,
19604    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19606    pub mission_mode: u8,
19607    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19609    pub mission_id: u32,
19610    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19612    pub fence_id: u32,
19613    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19614    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19615    pub rally_points_id: u32,
19616}
19617impl MISSION_CURRENT_DATA {
19618    pub const ENCODED_LEN: usize = 18usize;
19619    pub const DEFAULT: Self = Self {
19620        seq: 0_u16,
19621        total: 0_u16,
19622        mission_state: MissionState::DEFAULT,
19623        mission_mode: 0_u8,
19624        mission_id: 0_u32,
19625        fence_id: 0_u32,
19626        rally_points_id: 0_u32,
19627    };
19628    #[cfg(feature = "arbitrary")]
19629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19630        use arbitrary::{Arbitrary, Unstructured};
19631        let mut buf = [0u8; 1024];
19632        rng.fill_bytes(&mut buf);
19633        let mut unstructured = Unstructured::new(&buf);
19634        Self::arbitrary(&mut unstructured).unwrap_or_default()
19635    }
19636}
19637impl Default for MISSION_CURRENT_DATA {
19638    fn default() -> Self {
19639        Self::DEFAULT.clone()
19640    }
19641}
19642impl MessageData for MISSION_CURRENT_DATA {
19643    type Message = MavMessage;
19644    const ID: u32 = 42u32;
19645    const NAME: &'static str = "MISSION_CURRENT";
19646    const EXTRA_CRC: u8 = 28u8;
19647    const ENCODED_LEN: usize = 18usize;
19648    fn deser(
19649        _version: MavlinkVersion,
19650        __input: &[u8],
19651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19652        let avail_len = __input.len();
19653        let mut payload_buf = [0; Self::ENCODED_LEN];
19654        let mut buf = if avail_len < Self::ENCODED_LEN {
19655            payload_buf[0..avail_len].copy_from_slice(__input);
19656            Bytes::new(&payload_buf)
19657        } else {
19658            Bytes::new(__input)
19659        };
19660        let mut __struct = Self::default();
19661        __struct.seq = buf.get_u16_le();
19662        __struct.total = buf.get_u16_le();
19663        let tmp = buf.get_u8();
19664        __struct.mission_state =
19665            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19666                enum_type: "MissionState",
19667                value: tmp as u32,
19668            })?;
19669        __struct.mission_mode = buf.get_u8();
19670        __struct.mission_id = buf.get_u32_le();
19671        __struct.fence_id = buf.get_u32_le();
19672        __struct.rally_points_id = buf.get_u32_le();
19673        Ok(__struct)
19674    }
19675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19676        let mut __tmp = BytesMut::new(bytes);
19677        #[allow(clippy::absurd_extreme_comparisons)]
19678        #[allow(unused_comparisons)]
19679        if __tmp.remaining() < Self::ENCODED_LEN {
19680            panic!(
19681                "buffer is too small (need {} bytes, but got {})",
19682                Self::ENCODED_LEN,
19683                __tmp.remaining(),
19684            )
19685        }
19686        __tmp.put_u16_le(self.seq);
19687        __tmp.put_u16_le(self.total);
19688        __tmp.put_u8(self.mission_state as u8);
19689        __tmp.put_u8(self.mission_mode);
19690        __tmp.put_u32_le(self.mission_id);
19691        __tmp.put_u32_le(self.fence_id);
19692        __tmp.put_u32_le(self.rally_points_id);
19693        if matches!(version, MavlinkVersion::V2) {
19694            let len = __tmp.len();
19695            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19696        } else {
19697            __tmp.len()
19698        }
19699    }
19700}
19701#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19702#[doc = "id: 39"]
19703#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19704#[derive(Debug, Clone, PartialEq)]
19705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19707pub struct MISSION_ITEM_DATA {
19708    #[doc = "PARAM1, see MAV_CMD enum"]
19709    pub param1: f32,
19710    #[doc = "PARAM2, see MAV_CMD enum"]
19711    pub param2: f32,
19712    #[doc = "PARAM3, see MAV_CMD enum"]
19713    pub param3: f32,
19714    #[doc = "PARAM4, see MAV_CMD enum"]
19715    pub param4: f32,
19716    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19717    pub x: f32,
19718    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19719    pub y: f32,
19720    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19721    pub z: f32,
19722    #[doc = "Sequence"]
19723    pub seq: u16,
19724    #[doc = "The scheduled action for the waypoint."]
19725    pub command: MavCmd,
19726    #[doc = "System ID"]
19727    pub target_system: u8,
19728    #[doc = "Component ID"]
19729    pub target_component: u8,
19730    #[doc = "The coordinate system of the waypoint."]
19731    pub frame: MavFrame,
19732    #[doc = "false:0, true:1"]
19733    pub current: u8,
19734    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19735    pub autocontinue: u8,
19736    #[doc = "Mission type."]
19737    #[cfg_attr(feature = "serde", serde(default))]
19738    pub mission_type: MavMissionType,
19739}
19740impl MISSION_ITEM_DATA {
19741    pub const ENCODED_LEN: usize = 38usize;
19742    pub const DEFAULT: Self = Self {
19743        param1: 0.0_f32,
19744        param2: 0.0_f32,
19745        param3: 0.0_f32,
19746        param4: 0.0_f32,
19747        x: 0.0_f32,
19748        y: 0.0_f32,
19749        z: 0.0_f32,
19750        seq: 0_u16,
19751        command: MavCmd::DEFAULT,
19752        target_system: 0_u8,
19753        target_component: 0_u8,
19754        frame: MavFrame::DEFAULT,
19755        current: 0_u8,
19756        autocontinue: 0_u8,
19757        mission_type: MavMissionType::DEFAULT,
19758    };
19759    #[cfg(feature = "arbitrary")]
19760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19761        use arbitrary::{Arbitrary, Unstructured};
19762        let mut buf = [0u8; 1024];
19763        rng.fill_bytes(&mut buf);
19764        let mut unstructured = Unstructured::new(&buf);
19765        Self::arbitrary(&mut unstructured).unwrap_or_default()
19766    }
19767}
19768impl Default for MISSION_ITEM_DATA {
19769    fn default() -> Self {
19770        Self::DEFAULT.clone()
19771    }
19772}
19773impl MessageData for MISSION_ITEM_DATA {
19774    type Message = MavMessage;
19775    const ID: u32 = 39u32;
19776    const NAME: &'static str = "MISSION_ITEM";
19777    const EXTRA_CRC: u8 = 254u8;
19778    const ENCODED_LEN: usize = 38usize;
19779    fn deser(
19780        _version: MavlinkVersion,
19781        __input: &[u8],
19782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19783        let avail_len = __input.len();
19784        let mut payload_buf = [0; Self::ENCODED_LEN];
19785        let mut buf = if avail_len < Self::ENCODED_LEN {
19786            payload_buf[0..avail_len].copy_from_slice(__input);
19787            Bytes::new(&payload_buf)
19788        } else {
19789            Bytes::new(__input)
19790        };
19791        let mut __struct = Self::default();
19792        __struct.param1 = buf.get_f32_le();
19793        __struct.param2 = buf.get_f32_le();
19794        __struct.param3 = buf.get_f32_le();
19795        __struct.param4 = buf.get_f32_le();
19796        __struct.x = buf.get_f32_le();
19797        __struct.y = buf.get_f32_le();
19798        __struct.z = buf.get_f32_le();
19799        __struct.seq = buf.get_u16_le();
19800        let tmp = buf.get_u16_le();
19801        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19802            ::mavlink_core::error::ParserError::InvalidEnum {
19803                enum_type: "MavCmd",
19804                value: tmp as u32,
19805            },
19806        )?;
19807        __struct.target_system = buf.get_u8();
19808        __struct.target_component = buf.get_u8();
19809        let tmp = buf.get_u8();
19810        __struct.frame =
19811            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19812                enum_type: "MavFrame",
19813                value: tmp as u32,
19814            })?;
19815        __struct.current = buf.get_u8();
19816        __struct.autocontinue = buf.get_u8();
19817        let tmp = buf.get_u8();
19818        __struct.mission_type =
19819            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19820                enum_type: "MavMissionType",
19821                value: tmp as u32,
19822            })?;
19823        Ok(__struct)
19824    }
19825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19826        let mut __tmp = BytesMut::new(bytes);
19827        #[allow(clippy::absurd_extreme_comparisons)]
19828        #[allow(unused_comparisons)]
19829        if __tmp.remaining() < Self::ENCODED_LEN {
19830            panic!(
19831                "buffer is too small (need {} bytes, but got {})",
19832                Self::ENCODED_LEN,
19833                __tmp.remaining(),
19834            )
19835        }
19836        __tmp.put_f32_le(self.param1);
19837        __tmp.put_f32_le(self.param2);
19838        __tmp.put_f32_le(self.param3);
19839        __tmp.put_f32_le(self.param4);
19840        __tmp.put_f32_le(self.x);
19841        __tmp.put_f32_le(self.y);
19842        __tmp.put_f32_le(self.z);
19843        __tmp.put_u16_le(self.seq);
19844        __tmp.put_u16_le(self.command as u16);
19845        __tmp.put_u8(self.target_system);
19846        __tmp.put_u8(self.target_component);
19847        __tmp.put_u8(self.frame as u8);
19848        __tmp.put_u8(self.current);
19849        __tmp.put_u8(self.autocontinue);
19850        __tmp.put_u8(self.mission_type as u8);
19851        if matches!(version, MavlinkVersion::V2) {
19852            let len = __tmp.len();
19853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19854        } else {
19855            __tmp.len()
19856        }
19857    }
19858}
19859#[doc = "id: 73"]
19860#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19861#[derive(Debug, Clone, PartialEq)]
19862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19864pub struct MISSION_ITEM_INT_DATA {
19865    #[doc = "PARAM1, see MAV_CMD enum"]
19866    pub param1: f32,
19867    #[doc = "PARAM2, see MAV_CMD enum"]
19868    pub param2: f32,
19869    #[doc = "PARAM3, see MAV_CMD enum"]
19870    pub param3: f32,
19871    #[doc = "PARAM4, see MAV_CMD enum"]
19872    pub param4: f32,
19873    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19874    pub x: i32,
19875    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19876    pub y: i32,
19877    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19878    pub z: f32,
19879    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19880    pub seq: u16,
19881    #[doc = "The scheduled action for the waypoint."]
19882    pub command: MavCmd,
19883    #[doc = "System ID"]
19884    pub target_system: u8,
19885    #[doc = "Component ID"]
19886    pub target_component: u8,
19887    #[doc = "The coordinate system of the waypoint."]
19888    pub frame: MavFrame,
19889    #[doc = "false:0, true:1"]
19890    pub current: u8,
19891    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19892    pub autocontinue: u8,
19893    #[doc = "Mission type."]
19894    #[cfg_attr(feature = "serde", serde(default))]
19895    pub mission_type: MavMissionType,
19896}
19897impl MISSION_ITEM_INT_DATA {
19898    pub const ENCODED_LEN: usize = 38usize;
19899    pub const DEFAULT: Self = Self {
19900        param1: 0.0_f32,
19901        param2: 0.0_f32,
19902        param3: 0.0_f32,
19903        param4: 0.0_f32,
19904        x: 0_i32,
19905        y: 0_i32,
19906        z: 0.0_f32,
19907        seq: 0_u16,
19908        command: MavCmd::DEFAULT,
19909        target_system: 0_u8,
19910        target_component: 0_u8,
19911        frame: MavFrame::DEFAULT,
19912        current: 0_u8,
19913        autocontinue: 0_u8,
19914        mission_type: MavMissionType::DEFAULT,
19915    };
19916    #[cfg(feature = "arbitrary")]
19917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19918        use arbitrary::{Arbitrary, Unstructured};
19919        let mut buf = [0u8; 1024];
19920        rng.fill_bytes(&mut buf);
19921        let mut unstructured = Unstructured::new(&buf);
19922        Self::arbitrary(&mut unstructured).unwrap_or_default()
19923    }
19924}
19925impl Default for MISSION_ITEM_INT_DATA {
19926    fn default() -> Self {
19927        Self::DEFAULT.clone()
19928    }
19929}
19930impl MessageData for MISSION_ITEM_INT_DATA {
19931    type Message = MavMessage;
19932    const ID: u32 = 73u32;
19933    const NAME: &'static str = "MISSION_ITEM_INT";
19934    const EXTRA_CRC: u8 = 38u8;
19935    const ENCODED_LEN: usize = 38usize;
19936    fn deser(
19937        _version: MavlinkVersion,
19938        __input: &[u8],
19939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19940        let avail_len = __input.len();
19941        let mut payload_buf = [0; Self::ENCODED_LEN];
19942        let mut buf = if avail_len < Self::ENCODED_LEN {
19943            payload_buf[0..avail_len].copy_from_slice(__input);
19944            Bytes::new(&payload_buf)
19945        } else {
19946            Bytes::new(__input)
19947        };
19948        let mut __struct = Self::default();
19949        __struct.param1 = buf.get_f32_le();
19950        __struct.param2 = buf.get_f32_le();
19951        __struct.param3 = buf.get_f32_le();
19952        __struct.param4 = buf.get_f32_le();
19953        __struct.x = buf.get_i32_le();
19954        __struct.y = buf.get_i32_le();
19955        __struct.z = buf.get_f32_le();
19956        __struct.seq = buf.get_u16_le();
19957        let tmp = buf.get_u16_le();
19958        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19959            ::mavlink_core::error::ParserError::InvalidEnum {
19960                enum_type: "MavCmd",
19961                value: tmp as u32,
19962            },
19963        )?;
19964        __struct.target_system = buf.get_u8();
19965        __struct.target_component = buf.get_u8();
19966        let tmp = buf.get_u8();
19967        __struct.frame =
19968            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19969                enum_type: "MavFrame",
19970                value: tmp as u32,
19971            })?;
19972        __struct.current = buf.get_u8();
19973        __struct.autocontinue = buf.get_u8();
19974        let tmp = buf.get_u8();
19975        __struct.mission_type =
19976            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19977                enum_type: "MavMissionType",
19978                value: tmp as u32,
19979            })?;
19980        Ok(__struct)
19981    }
19982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19983        let mut __tmp = BytesMut::new(bytes);
19984        #[allow(clippy::absurd_extreme_comparisons)]
19985        #[allow(unused_comparisons)]
19986        if __tmp.remaining() < Self::ENCODED_LEN {
19987            panic!(
19988                "buffer is too small (need {} bytes, but got {})",
19989                Self::ENCODED_LEN,
19990                __tmp.remaining(),
19991            )
19992        }
19993        __tmp.put_f32_le(self.param1);
19994        __tmp.put_f32_le(self.param2);
19995        __tmp.put_f32_le(self.param3);
19996        __tmp.put_f32_le(self.param4);
19997        __tmp.put_i32_le(self.x);
19998        __tmp.put_i32_le(self.y);
19999        __tmp.put_f32_le(self.z);
20000        __tmp.put_u16_le(self.seq);
20001        __tmp.put_u16_le(self.command as u16);
20002        __tmp.put_u8(self.target_system);
20003        __tmp.put_u8(self.target_component);
20004        __tmp.put_u8(self.frame as u8);
20005        __tmp.put_u8(self.current);
20006        __tmp.put_u8(self.autocontinue);
20007        __tmp.put_u8(self.mission_type as u8);
20008        if matches!(version, MavlinkVersion::V2) {
20009            let len = __tmp.len();
20010            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20011        } else {
20012            __tmp.len()
20013        }
20014    }
20015}
20016#[doc = "id: 46"]
20017#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20018#[derive(Debug, Clone, PartialEq)]
20019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20021pub struct MISSION_ITEM_REACHED_DATA {
20022    #[doc = "Sequence"]
20023    pub seq: u16,
20024}
20025impl MISSION_ITEM_REACHED_DATA {
20026    pub const ENCODED_LEN: usize = 2usize;
20027    pub const DEFAULT: Self = Self { seq: 0_u16 };
20028    #[cfg(feature = "arbitrary")]
20029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20030        use arbitrary::{Arbitrary, Unstructured};
20031        let mut buf = [0u8; 1024];
20032        rng.fill_bytes(&mut buf);
20033        let mut unstructured = Unstructured::new(&buf);
20034        Self::arbitrary(&mut unstructured).unwrap_or_default()
20035    }
20036}
20037impl Default for MISSION_ITEM_REACHED_DATA {
20038    fn default() -> Self {
20039        Self::DEFAULT.clone()
20040    }
20041}
20042impl MessageData for MISSION_ITEM_REACHED_DATA {
20043    type Message = MavMessage;
20044    const ID: u32 = 46u32;
20045    const NAME: &'static str = "MISSION_ITEM_REACHED";
20046    const EXTRA_CRC: u8 = 11u8;
20047    const ENCODED_LEN: usize = 2usize;
20048    fn deser(
20049        _version: MavlinkVersion,
20050        __input: &[u8],
20051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20052        let avail_len = __input.len();
20053        let mut payload_buf = [0; Self::ENCODED_LEN];
20054        let mut buf = if avail_len < Self::ENCODED_LEN {
20055            payload_buf[0..avail_len].copy_from_slice(__input);
20056            Bytes::new(&payload_buf)
20057        } else {
20058            Bytes::new(__input)
20059        };
20060        let mut __struct = Self::default();
20061        __struct.seq = buf.get_u16_le();
20062        Ok(__struct)
20063    }
20064    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20065        let mut __tmp = BytesMut::new(bytes);
20066        #[allow(clippy::absurd_extreme_comparisons)]
20067        #[allow(unused_comparisons)]
20068        if __tmp.remaining() < Self::ENCODED_LEN {
20069            panic!(
20070                "buffer is too small (need {} bytes, but got {})",
20071                Self::ENCODED_LEN,
20072                __tmp.remaining(),
20073            )
20074        }
20075        __tmp.put_u16_le(self.seq);
20076        if matches!(version, MavlinkVersion::V2) {
20077            let len = __tmp.len();
20078            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20079        } else {
20080            __tmp.len()
20081        }
20082    }
20083}
20084#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20085#[doc = "id: 40"]
20086#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20087#[derive(Debug, Clone, PartialEq)]
20088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20090pub struct MISSION_REQUEST_DATA {
20091    #[doc = "Sequence"]
20092    pub seq: u16,
20093    #[doc = "System ID"]
20094    pub target_system: u8,
20095    #[doc = "Component ID"]
20096    pub target_component: u8,
20097    #[doc = "Mission type."]
20098    #[cfg_attr(feature = "serde", serde(default))]
20099    pub mission_type: MavMissionType,
20100}
20101impl MISSION_REQUEST_DATA {
20102    pub const ENCODED_LEN: usize = 5usize;
20103    pub const DEFAULT: Self = Self {
20104        seq: 0_u16,
20105        target_system: 0_u8,
20106        target_component: 0_u8,
20107        mission_type: MavMissionType::DEFAULT,
20108    };
20109    #[cfg(feature = "arbitrary")]
20110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20111        use arbitrary::{Arbitrary, Unstructured};
20112        let mut buf = [0u8; 1024];
20113        rng.fill_bytes(&mut buf);
20114        let mut unstructured = Unstructured::new(&buf);
20115        Self::arbitrary(&mut unstructured).unwrap_or_default()
20116    }
20117}
20118impl Default for MISSION_REQUEST_DATA {
20119    fn default() -> Self {
20120        Self::DEFAULT.clone()
20121    }
20122}
20123impl MessageData for MISSION_REQUEST_DATA {
20124    type Message = MavMessage;
20125    const ID: u32 = 40u32;
20126    const NAME: &'static str = "MISSION_REQUEST";
20127    const EXTRA_CRC: u8 = 230u8;
20128    const ENCODED_LEN: usize = 5usize;
20129    fn deser(
20130        _version: MavlinkVersion,
20131        __input: &[u8],
20132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20133        let avail_len = __input.len();
20134        let mut payload_buf = [0; Self::ENCODED_LEN];
20135        let mut buf = if avail_len < Self::ENCODED_LEN {
20136            payload_buf[0..avail_len].copy_from_slice(__input);
20137            Bytes::new(&payload_buf)
20138        } else {
20139            Bytes::new(__input)
20140        };
20141        let mut __struct = Self::default();
20142        __struct.seq = buf.get_u16_le();
20143        __struct.target_system = buf.get_u8();
20144        __struct.target_component = buf.get_u8();
20145        let tmp = buf.get_u8();
20146        __struct.mission_type =
20147            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20148                enum_type: "MavMissionType",
20149                value: tmp as u32,
20150            })?;
20151        Ok(__struct)
20152    }
20153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20154        let mut __tmp = BytesMut::new(bytes);
20155        #[allow(clippy::absurd_extreme_comparisons)]
20156        #[allow(unused_comparisons)]
20157        if __tmp.remaining() < Self::ENCODED_LEN {
20158            panic!(
20159                "buffer is too small (need {} bytes, but got {})",
20160                Self::ENCODED_LEN,
20161                __tmp.remaining(),
20162            )
20163        }
20164        __tmp.put_u16_le(self.seq);
20165        __tmp.put_u8(self.target_system);
20166        __tmp.put_u8(self.target_component);
20167        __tmp.put_u8(self.mission_type as u8);
20168        if matches!(version, MavlinkVersion::V2) {
20169            let len = __tmp.len();
20170            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20171        } else {
20172            __tmp.len()
20173        }
20174    }
20175}
20176#[doc = "id: 51"]
20177#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20178#[derive(Debug, Clone, PartialEq)]
20179#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20180#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20181pub struct MISSION_REQUEST_INT_DATA {
20182    #[doc = "Sequence"]
20183    pub seq: u16,
20184    #[doc = "System ID"]
20185    pub target_system: u8,
20186    #[doc = "Component ID"]
20187    pub target_component: u8,
20188    #[doc = "Mission type."]
20189    #[cfg_attr(feature = "serde", serde(default))]
20190    pub mission_type: MavMissionType,
20191}
20192impl MISSION_REQUEST_INT_DATA {
20193    pub const ENCODED_LEN: usize = 5usize;
20194    pub const DEFAULT: Self = Self {
20195        seq: 0_u16,
20196        target_system: 0_u8,
20197        target_component: 0_u8,
20198        mission_type: MavMissionType::DEFAULT,
20199    };
20200    #[cfg(feature = "arbitrary")]
20201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20202        use arbitrary::{Arbitrary, Unstructured};
20203        let mut buf = [0u8; 1024];
20204        rng.fill_bytes(&mut buf);
20205        let mut unstructured = Unstructured::new(&buf);
20206        Self::arbitrary(&mut unstructured).unwrap_or_default()
20207    }
20208}
20209impl Default for MISSION_REQUEST_INT_DATA {
20210    fn default() -> Self {
20211        Self::DEFAULT.clone()
20212    }
20213}
20214impl MessageData for MISSION_REQUEST_INT_DATA {
20215    type Message = MavMessage;
20216    const ID: u32 = 51u32;
20217    const NAME: &'static str = "MISSION_REQUEST_INT";
20218    const EXTRA_CRC: u8 = 196u8;
20219    const ENCODED_LEN: usize = 5usize;
20220    fn deser(
20221        _version: MavlinkVersion,
20222        __input: &[u8],
20223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20224        let avail_len = __input.len();
20225        let mut payload_buf = [0; Self::ENCODED_LEN];
20226        let mut buf = if avail_len < Self::ENCODED_LEN {
20227            payload_buf[0..avail_len].copy_from_slice(__input);
20228            Bytes::new(&payload_buf)
20229        } else {
20230            Bytes::new(__input)
20231        };
20232        let mut __struct = Self::default();
20233        __struct.seq = buf.get_u16_le();
20234        __struct.target_system = buf.get_u8();
20235        __struct.target_component = buf.get_u8();
20236        let tmp = buf.get_u8();
20237        __struct.mission_type =
20238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20239                enum_type: "MavMissionType",
20240                value: tmp as u32,
20241            })?;
20242        Ok(__struct)
20243    }
20244    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20245        let mut __tmp = BytesMut::new(bytes);
20246        #[allow(clippy::absurd_extreme_comparisons)]
20247        #[allow(unused_comparisons)]
20248        if __tmp.remaining() < Self::ENCODED_LEN {
20249            panic!(
20250                "buffer is too small (need {} bytes, but got {})",
20251                Self::ENCODED_LEN,
20252                __tmp.remaining(),
20253            )
20254        }
20255        __tmp.put_u16_le(self.seq);
20256        __tmp.put_u8(self.target_system);
20257        __tmp.put_u8(self.target_component);
20258        __tmp.put_u8(self.mission_type as u8);
20259        if matches!(version, MavlinkVersion::V2) {
20260            let len = __tmp.len();
20261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20262        } else {
20263            __tmp.len()
20264        }
20265    }
20266}
20267#[doc = "id: 43"]
20268#[doc = "Request the overall list of mission items from the system/component."]
20269#[derive(Debug, Clone, PartialEq)]
20270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20272pub struct MISSION_REQUEST_LIST_DATA {
20273    #[doc = "System ID"]
20274    pub target_system: u8,
20275    #[doc = "Component ID"]
20276    pub target_component: u8,
20277    #[doc = "Mission type."]
20278    #[cfg_attr(feature = "serde", serde(default))]
20279    pub mission_type: MavMissionType,
20280}
20281impl MISSION_REQUEST_LIST_DATA {
20282    pub const ENCODED_LEN: usize = 3usize;
20283    pub const DEFAULT: Self = Self {
20284        target_system: 0_u8,
20285        target_component: 0_u8,
20286        mission_type: MavMissionType::DEFAULT,
20287    };
20288    #[cfg(feature = "arbitrary")]
20289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20290        use arbitrary::{Arbitrary, Unstructured};
20291        let mut buf = [0u8; 1024];
20292        rng.fill_bytes(&mut buf);
20293        let mut unstructured = Unstructured::new(&buf);
20294        Self::arbitrary(&mut unstructured).unwrap_or_default()
20295    }
20296}
20297impl Default for MISSION_REQUEST_LIST_DATA {
20298    fn default() -> Self {
20299        Self::DEFAULT.clone()
20300    }
20301}
20302impl MessageData for MISSION_REQUEST_LIST_DATA {
20303    type Message = MavMessage;
20304    const ID: u32 = 43u32;
20305    const NAME: &'static str = "MISSION_REQUEST_LIST";
20306    const EXTRA_CRC: u8 = 132u8;
20307    const ENCODED_LEN: usize = 3usize;
20308    fn deser(
20309        _version: MavlinkVersion,
20310        __input: &[u8],
20311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20312        let avail_len = __input.len();
20313        let mut payload_buf = [0; Self::ENCODED_LEN];
20314        let mut buf = if avail_len < Self::ENCODED_LEN {
20315            payload_buf[0..avail_len].copy_from_slice(__input);
20316            Bytes::new(&payload_buf)
20317        } else {
20318            Bytes::new(__input)
20319        };
20320        let mut __struct = Self::default();
20321        __struct.target_system = buf.get_u8();
20322        __struct.target_component = buf.get_u8();
20323        let tmp = buf.get_u8();
20324        __struct.mission_type =
20325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20326                enum_type: "MavMissionType",
20327                value: tmp as u32,
20328            })?;
20329        Ok(__struct)
20330    }
20331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20332        let mut __tmp = BytesMut::new(bytes);
20333        #[allow(clippy::absurd_extreme_comparisons)]
20334        #[allow(unused_comparisons)]
20335        if __tmp.remaining() < Self::ENCODED_LEN {
20336            panic!(
20337                "buffer is too small (need {} bytes, but got {})",
20338                Self::ENCODED_LEN,
20339                __tmp.remaining(),
20340            )
20341        }
20342        __tmp.put_u8(self.target_system);
20343        __tmp.put_u8(self.target_component);
20344        __tmp.put_u8(self.mission_type as u8);
20345        if matches!(version, MavlinkVersion::V2) {
20346            let len = __tmp.len();
20347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20348        } else {
20349            __tmp.len()
20350        }
20351    }
20352}
20353#[doc = "id: 37"]
20354#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20355#[derive(Debug, Clone, PartialEq)]
20356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20358pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20359    #[doc = "Start index"]
20360    pub start_index: i16,
20361    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20362    pub end_index: i16,
20363    #[doc = "System ID"]
20364    pub target_system: u8,
20365    #[doc = "Component ID"]
20366    pub target_component: u8,
20367    #[doc = "Mission type."]
20368    #[cfg_attr(feature = "serde", serde(default))]
20369    pub mission_type: MavMissionType,
20370}
20371impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20372    pub const ENCODED_LEN: usize = 7usize;
20373    pub const DEFAULT: Self = Self {
20374        start_index: 0_i16,
20375        end_index: 0_i16,
20376        target_system: 0_u8,
20377        target_component: 0_u8,
20378        mission_type: MavMissionType::DEFAULT,
20379    };
20380    #[cfg(feature = "arbitrary")]
20381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20382        use arbitrary::{Arbitrary, Unstructured};
20383        let mut buf = [0u8; 1024];
20384        rng.fill_bytes(&mut buf);
20385        let mut unstructured = Unstructured::new(&buf);
20386        Self::arbitrary(&mut unstructured).unwrap_or_default()
20387    }
20388}
20389impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20390    fn default() -> Self {
20391        Self::DEFAULT.clone()
20392    }
20393}
20394impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20395    type Message = MavMessage;
20396    const ID: u32 = 37u32;
20397    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20398    const EXTRA_CRC: u8 = 212u8;
20399    const ENCODED_LEN: usize = 7usize;
20400    fn deser(
20401        _version: MavlinkVersion,
20402        __input: &[u8],
20403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20404        let avail_len = __input.len();
20405        let mut payload_buf = [0; Self::ENCODED_LEN];
20406        let mut buf = if avail_len < Self::ENCODED_LEN {
20407            payload_buf[0..avail_len].copy_from_slice(__input);
20408            Bytes::new(&payload_buf)
20409        } else {
20410            Bytes::new(__input)
20411        };
20412        let mut __struct = Self::default();
20413        __struct.start_index = buf.get_i16_le();
20414        __struct.end_index = buf.get_i16_le();
20415        __struct.target_system = buf.get_u8();
20416        __struct.target_component = buf.get_u8();
20417        let tmp = buf.get_u8();
20418        __struct.mission_type =
20419            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20420                enum_type: "MavMissionType",
20421                value: tmp as u32,
20422            })?;
20423        Ok(__struct)
20424    }
20425    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20426        let mut __tmp = BytesMut::new(bytes);
20427        #[allow(clippy::absurd_extreme_comparisons)]
20428        #[allow(unused_comparisons)]
20429        if __tmp.remaining() < Self::ENCODED_LEN {
20430            panic!(
20431                "buffer is too small (need {} bytes, but got {})",
20432                Self::ENCODED_LEN,
20433                __tmp.remaining(),
20434            )
20435        }
20436        __tmp.put_i16_le(self.start_index);
20437        __tmp.put_i16_le(self.end_index);
20438        __tmp.put_u8(self.target_system);
20439        __tmp.put_u8(self.target_component);
20440        __tmp.put_u8(self.mission_type as u8);
20441        if matches!(version, MavlinkVersion::V2) {
20442            let len = __tmp.len();
20443            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20444        } else {
20445            __tmp.len()
20446        }
20447    }
20448}
20449#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20450#[doc = "id: 41"]
20451#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20452#[derive(Debug, Clone, PartialEq)]
20453#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20454#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20455pub struct MISSION_SET_CURRENT_DATA {
20456    #[doc = "Sequence"]
20457    pub seq: u16,
20458    #[doc = "System ID"]
20459    pub target_system: u8,
20460    #[doc = "Component ID"]
20461    pub target_component: u8,
20462}
20463impl MISSION_SET_CURRENT_DATA {
20464    pub const ENCODED_LEN: usize = 4usize;
20465    pub const DEFAULT: Self = Self {
20466        seq: 0_u16,
20467        target_system: 0_u8,
20468        target_component: 0_u8,
20469    };
20470    #[cfg(feature = "arbitrary")]
20471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20472        use arbitrary::{Arbitrary, Unstructured};
20473        let mut buf = [0u8; 1024];
20474        rng.fill_bytes(&mut buf);
20475        let mut unstructured = Unstructured::new(&buf);
20476        Self::arbitrary(&mut unstructured).unwrap_or_default()
20477    }
20478}
20479impl Default for MISSION_SET_CURRENT_DATA {
20480    fn default() -> Self {
20481        Self::DEFAULT.clone()
20482    }
20483}
20484impl MessageData for MISSION_SET_CURRENT_DATA {
20485    type Message = MavMessage;
20486    const ID: u32 = 41u32;
20487    const NAME: &'static str = "MISSION_SET_CURRENT";
20488    const EXTRA_CRC: u8 = 28u8;
20489    const ENCODED_LEN: usize = 4usize;
20490    fn deser(
20491        _version: MavlinkVersion,
20492        __input: &[u8],
20493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20494        let avail_len = __input.len();
20495        let mut payload_buf = [0; Self::ENCODED_LEN];
20496        let mut buf = if avail_len < Self::ENCODED_LEN {
20497            payload_buf[0..avail_len].copy_from_slice(__input);
20498            Bytes::new(&payload_buf)
20499        } else {
20500            Bytes::new(__input)
20501        };
20502        let mut __struct = Self::default();
20503        __struct.seq = buf.get_u16_le();
20504        __struct.target_system = buf.get_u8();
20505        __struct.target_component = buf.get_u8();
20506        Ok(__struct)
20507    }
20508    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20509        let mut __tmp = BytesMut::new(bytes);
20510        #[allow(clippy::absurd_extreme_comparisons)]
20511        #[allow(unused_comparisons)]
20512        if __tmp.remaining() < Self::ENCODED_LEN {
20513            panic!(
20514                "buffer is too small (need {} bytes, but got {})",
20515                Self::ENCODED_LEN,
20516                __tmp.remaining(),
20517            )
20518        }
20519        __tmp.put_u16_le(self.seq);
20520        __tmp.put_u8(self.target_system);
20521        __tmp.put_u8(self.target_component);
20522        if matches!(version, MavlinkVersion::V2) {
20523            let len = __tmp.len();
20524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20525        } else {
20526            __tmp.len()
20527        }
20528    }
20529}
20530#[doc = "id: 38"]
20531#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20532#[derive(Debug, Clone, PartialEq)]
20533#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20535pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20536    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20537    pub start_index: i16,
20538    #[doc = "End index, equal or greater than start index."]
20539    pub end_index: i16,
20540    #[doc = "System ID"]
20541    pub target_system: u8,
20542    #[doc = "Component ID"]
20543    pub target_component: u8,
20544    #[doc = "Mission type."]
20545    #[cfg_attr(feature = "serde", serde(default))]
20546    pub mission_type: MavMissionType,
20547}
20548impl MISSION_WRITE_PARTIAL_LIST_DATA {
20549    pub const ENCODED_LEN: usize = 7usize;
20550    pub const DEFAULT: Self = Self {
20551        start_index: 0_i16,
20552        end_index: 0_i16,
20553        target_system: 0_u8,
20554        target_component: 0_u8,
20555        mission_type: MavMissionType::DEFAULT,
20556    };
20557    #[cfg(feature = "arbitrary")]
20558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20559        use arbitrary::{Arbitrary, Unstructured};
20560        let mut buf = [0u8; 1024];
20561        rng.fill_bytes(&mut buf);
20562        let mut unstructured = Unstructured::new(&buf);
20563        Self::arbitrary(&mut unstructured).unwrap_or_default()
20564    }
20565}
20566impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20567    fn default() -> Self {
20568        Self::DEFAULT.clone()
20569    }
20570}
20571impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20572    type Message = MavMessage;
20573    const ID: u32 = 38u32;
20574    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20575    const EXTRA_CRC: u8 = 9u8;
20576    const ENCODED_LEN: usize = 7usize;
20577    fn deser(
20578        _version: MavlinkVersion,
20579        __input: &[u8],
20580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20581        let avail_len = __input.len();
20582        let mut payload_buf = [0; Self::ENCODED_LEN];
20583        let mut buf = if avail_len < Self::ENCODED_LEN {
20584            payload_buf[0..avail_len].copy_from_slice(__input);
20585            Bytes::new(&payload_buf)
20586        } else {
20587            Bytes::new(__input)
20588        };
20589        let mut __struct = Self::default();
20590        __struct.start_index = buf.get_i16_le();
20591        __struct.end_index = buf.get_i16_le();
20592        __struct.target_system = buf.get_u8();
20593        __struct.target_component = buf.get_u8();
20594        let tmp = buf.get_u8();
20595        __struct.mission_type =
20596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20597                enum_type: "MavMissionType",
20598                value: tmp as u32,
20599            })?;
20600        Ok(__struct)
20601    }
20602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20603        let mut __tmp = BytesMut::new(bytes);
20604        #[allow(clippy::absurd_extreme_comparisons)]
20605        #[allow(unused_comparisons)]
20606        if __tmp.remaining() < Self::ENCODED_LEN {
20607            panic!(
20608                "buffer is too small (need {} bytes, but got {})",
20609                Self::ENCODED_LEN,
20610                __tmp.remaining(),
20611            )
20612        }
20613        __tmp.put_i16_le(self.start_index);
20614        __tmp.put_i16_le(self.end_index);
20615        __tmp.put_u8(self.target_system);
20616        __tmp.put_u8(self.target_component);
20617        __tmp.put_u8(self.mission_type as u8);
20618        if matches!(version, MavlinkVersion::V2) {
20619            let len = __tmp.len();
20620            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20621        } else {
20622            __tmp.len()
20623        }
20624    }
20625}
20626#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20627#[doc = "id: 265"]
20628#[doc = "Orientation of a mount."]
20629#[derive(Debug, Clone, PartialEq)]
20630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20632pub struct MOUNT_ORIENTATION_DATA {
20633    #[doc = "Timestamp (time since system boot)."]
20634    pub time_boot_ms: u32,
20635    #[doc = "Roll in global frame (set to NaN for invalid)."]
20636    pub roll: f32,
20637    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20638    pub pitch: f32,
20639    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20640    pub yaw: f32,
20641    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20643    pub yaw_absolute: f32,
20644}
20645impl MOUNT_ORIENTATION_DATA {
20646    pub const ENCODED_LEN: usize = 20usize;
20647    pub const DEFAULT: Self = Self {
20648        time_boot_ms: 0_u32,
20649        roll: 0.0_f32,
20650        pitch: 0.0_f32,
20651        yaw: 0.0_f32,
20652        yaw_absolute: 0.0_f32,
20653    };
20654    #[cfg(feature = "arbitrary")]
20655    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20656        use arbitrary::{Arbitrary, Unstructured};
20657        let mut buf = [0u8; 1024];
20658        rng.fill_bytes(&mut buf);
20659        let mut unstructured = Unstructured::new(&buf);
20660        Self::arbitrary(&mut unstructured).unwrap_or_default()
20661    }
20662}
20663impl Default for MOUNT_ORIENTATION_DATA {
20664    fn default() -> Self {
20665        Self::DEFAULT.clone()
20666    }
20667}
20668impl MessageData for MOUNT_ORIENTATION_DATA {
20669    type Message = MavMessage;
20670    const ID: u32 = 265u32;
20671    const NAME: &'static str = "MOUNT_ORIENTATION";
20672    const EXTRA_CRC: u8 = 26u8;
20673    const ENCODED_LEN: usize = 20usize;
20674    fn deser(
20675        _version: MavlinkVersion,
20676        __input: &[u8],
20677    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20678        let avail_len = __input.len();
20679        let mut payload_buf = [0; Self::ENCODED_LEN];
20680        let mut buf = if avail_len < Self::ENCODED_LEN {
20681            payload_buf[0..avail_len].copy_from_slice(__input);
20682            Bytes::new(&payload_buf)
20683        } else {
20684            Bytes::new(__input)
20685        };
20686        let mut __struct = Self::default();
20687        __struct.time_boot_ms = buf.get_u32_le();
20688        __struct.roll = buf.get_f32_le();
20689        __struct.pitch = buf.get_f32_le();
20690        __struct.yaw = buf.get_f32_le();
20691        __struct.yaw_absolute = buf.get_f32_le();
20692        Ok(__struct)
20693    }
20694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20695        let mut __tmp = BytesMut::new(bytes);
20696        #[allow(clippy::absurd_extreme_comparisons)]
20697        #[allow(unused_comparisons)]
20698        if __tmp.remaining() < Self::ENCODED_LEN {
20699            panic!(
20700                "buffer is too small (need {} bytes, but got {})",
20701                Self::ENCODED_LEN,
20702                __tmp.remaining(),
20703            )
20704        }
20705        __tmp.put_u32_le(self.time_boot_ms);
20706        __tmp.put_f32_le(self.roll);
20707        __tmp.put_f32_le(self.pitch);
20708        __tmp.put_f32_le(self.yaw);
20709        __tmp.put_f32_le(self.yaw_absolute);
20710        if matches!(version, MavlinkVersion::V2) {
20711            let len = __tmp.len();
20712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20713        } else {
20714            __tmp.len()
20715        }
20716    }
20717}
20718#[doc = "id: 251"]
20719#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20720#[derive(Debug, Clone, PartialEq)]
20721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20723pub struct NAMED_VALUE_FLOAT_DATA {
20724    #[doc = "Timestamp (time since system boot)."]
20725    pub time_boot_ms: u32,
20726    #[doc = "Floating point value"]
20727    pub value: f32,
20728    #[doc = "Name of the debug variable"]
20729    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20730    pub name: [u8; 10],
20731}
20732impl NAMED_VALUE_FLOAT_DATA {
20733    pub const ENCODED_LEN: usize = 18usize;
20734    pub const DEFAULT: Self = Self {
20735        time_boot_ms: 0_u32,
20736        value: 0.0_f32,
20737        name: [0_u8; 10usize],
20738    };
20739    #[cfg(feature = "arbitrary")]
20740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20741        use arbitrary::{Arbitrary, Unstructured};
20742        let mut buf = [0u8; 1024];
20743        rng.fill_bytes(&mut buf);
20744        let mut unstructured = Unstructured::new(&buf);
20745        Self::arbitrary(&mut unstructured).unwrap_or_default()
20746    }
20747}
20748impl Default for NAMED_VALUE_FLOAT_DATA {
20749    fn default() -> Self {
20750        Self::DEFAULT.clone()
20751    }
20752}
20753impl MessageData for NAMED_VALUE_FLOAT_DATA {
20754    type Message = MavMessage;
20755    const ID: u32 = 251u32;
20756    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20757    const EXTRA_CRC: u8 = 170u8;
20758    const ENCODED_LEN: usize = 18usize;
20759    fn deser(
20760        _version: MavlinkVersion,
20761        __input: &[u8],
20762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20763        let avail_len = __input.len();
20764        let mut payload_buf = [0; Self::ENCODED_LEN];
20765        let mut buf = if avail_len < Self::ENCODED_LEN {
20766            payload_buf[0..avail_len].copy_from_slice(__input);
20767            Bytes::new(&payload_buf)
20768        } else {
20769            Bytes::new(__input)
20770        };
20771        let mut __struct = Self::default();
20772        __struct.time_boot_ms = buf.get_u32_le();
20773        __struct.value = buf.get_f32_le();
20774        for v in &mut __struct.name {
20775            let val = buf.get_u8();
20776            *v = val;
20777        }
20778        Ok(__struct)
20779    }
20780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20781        let mut __tmp = BytesMut::new(bytes);
20782        #[allow(clippy::absurd_extreme_comparisons)]
20783        #[allow(unused_comparisons)]
20784        if __tmp.remaining() < Self::ENCODED_LEN {
20785            panic!(
20786                "buffer is too small (need {} bytes, but got {})",
20787                Self::ENCODED_LEN,
20788                __tmp.remaining(),
20789            )
20790        }
20791        __tmp.put_u32_le(self.time_boot_ms);
20792        __tmp.put_f32_le(self.value);
20793        for val in &self.name {
20794            __tmp.put_u8(*val);
20795        }
20796        if matches!(version, MavlinkVersion::V2) {
20797            let len = __tmp.len();
20798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20799        } else {
20800            __tmp.len()
20801        }
20802    }
20803}
20804#[doc = "id: 252"]
20805#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20806#[derive(Debug, Clone, PartialEq)]
20807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20809pub struct NAMED_VALUE_INT_DATA {
20810    #[doc = "Timestamp (time since system boot)."]
20811    pub time_boot_ms: u32,
20812    #[doc = "Signed integer value"]
20813    pub value: i32,
20814    #[doc = "Name of the debug variable"]
20815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20816    pub name: [u8; 10],
20817}
20818impl NAMED_VALUE_INT_DATA {
20819    pub const ENCODED_LEN: usize = 18usize;
20820    pub const DEFAULT: Self = Self {
20821        time_boot_ms: 0_u32,
20822        value: 0_i32,
20823        name: [0_u8; 10usize],
20824    };
20825    #[cfg(feature = "arbitrary")]
20826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20827        use arbitrary::{Arbitrary, Unstructured};
20828        let mut buf = [0u8; 1024];
20829        rng.fill_bytes(&mut buf);
20830        let mut unstructured = Unstructured::new(&buf);
20831        Self::arbitrary(&mut unstructured).unwrap_or_default()
20832    }
20833}
20834impl Default for NAMED_VALUE_INT_DATA {
20835    fn default() -> Self {
20836        Self::DEFAULT.clone()
20837    }
20838}
20839impl MessageData for NAMED_VALUE_INT_DATA {
20840    type Message = MavMessage;
20841    const ID: u32 = 252u32;
20842    const NAME: &'static str = "NAMED_VALUE_INT";
20843    const EXTRA_CRC: u8 = 44u8;
20844    const ENCODED_LEN: usize = 18usize;
20845    fn deser(
20846        _version: MavlinkVersion,
20847        __input: &[u8],
20848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20849        let avail_len = __input.len();
20850        let mut payload_buf = [0; Self::ENCODED_LEN];
20851        let mut buf = if avail_len < Self::ENCODED_LEN {
20852            payload_buf[0..avail_len].copy_from_slice(__input);
20853            Bytes::new(&payload_buf)
20854        } else {
20855            Bytes::new(__input)
20856        };
20857        let mut __struct = Self::default();
20858        __struct.time_boot_ms = buf.get_u32_le();
20859        __struct.value = buf.get_i32_le();
20860        for v in &mut __struct.name {
20861            let val = buf.get_u8();
20862            *v = val;
20863        }
20864        Ok(__struct)
20865    }
20866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20867        let mut __tmp = BytesMut::new(bytes);
20868        #[allow(clippy::absurd_extreme_comparisons)]
20869        #[allow(unused_comparisons)]
20870        if __tmp.remaining() < Self::ENCODED_LEN {
20871            panic!(
20872                "buffer is too small (need {} bytes, but got {})",
20873                Self::ENCODED_LEN,
20874                __tmp.remaining(),
20875            )
20876        }
20877        __tmp.put_u32_le(self.time_boot_ms);
20878        __tmp.put_i32_le(self.value);
20879        for val in &self.name {
20880            __tmp.put_u8(*val);
20881        }
20882        if matches!(version, MavlinkVersion::V2) {
20883            let len = __tmp.len();
20884            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20885        } else {
20886            __tmp.len()
20887        }
20888    }
20889}
20890#[doc = "id: 62"]
20891#[doc = "The state of the navigation and position controller."]
20892#[derive(Debug, Clone, PartialEq)]
20893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20895pub struct NAV_CONTROLLER_OUTPUT_DATA {
20896    #[doc = "Current desired roll"]
20897    pub nav_roll: f32,
20898    #[doc = "Current desired pitch"]
20899    pub nav_pitch: f32,
20900    #[doc = "Current altitude error"]
20901    pub alt_error: f32,
20902    #[doc = "Current airspeed error"]
20903    pub aspd_error: f32,
20904    #[doc = "Current crosstrack error on x-y plane"]
20905    pub xtrack_error: f32,
20906    #[doc = "Current desired heading"]
20907    pub nav_bearing: i16,
20908    #[doc = "Bearing to current waypoint/target"]
20909    pub target_bearing: i16,
20910    #[doc = "Distance to active waypoint"]
20911    pub wp_dist: u16,
20912}
20913impl NAV_CONTROLLER_OUTPUT_DATA {
20914    pub const ENCODED_LEN: usize = 26usize;
20915    pub const DEFAULT: Self = Self {
20916        nav_roll: 0.0_f32,
20917        nav_pitch: 0.0_f32,
20918        alt_error: 0.0_f32,
20919        aspd_error: 0.0_f32,
20920        xtrack_error: 0.0_f32,
20921        nav_bearing: 0_i16,
20922        target_bearing: 0_i16,
20923        wp_dist: 0_u16,
20924    };
20925    #[cfg(feature = "arbitrary")]
20926    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20927        use arbitrary::{Arbitrary, Unstructured};
20928        let mut buf = [0u8; 1024];
20929        rng.fill_bytes(&mut buf);
20930        let mut unstructured = Unstructured::new(&buf);
20931        Self::arbitrary(&mut unstructured).unwrap_or_default()
20932    }
20933}
20934impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20935    fn default() -> Self {
20936        Self::DEFAULT.clone()
20937    }
20938}
20939impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20940    type Message = MavMessage;
20941    const ID: u32 = 62u32;
20942    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20943    const EXTRA_CRC: u8 = 183u8;
20944    const ENCODED_LEN: usize = 26usize;
20945    fn deser(
20946        _version: MavlinkVersion,
20947        __input: &[u8],
20948    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20949        let avail_len = __input.len();
20950        let mut payload_buf = [0; Self::ENCODED_LEN];
20951        let mut buf = if avail_len < Self::ENCODED_LEN {
20952            payload_buf[0..avail_len].copy_from_slice(__input);
20953            Bytes::new(&payload_buf)
20954        } else {
20955            Bytes::new(__input)
20956        };
20957        let mut __struct = Self::default();
20958        __struct.nav_roll = buf.get_f32_le();
20959        __struct.nav_pitch = buf.get_f32_le();
20960        __struct.alt_error = buf.get_f32_le();
20961        __struct.aspd_error = buf.get_f32_le();
20962        __struct.xtrack_error = buf.get_f32_le();
20963        __struct.nav_bearing = buf.get_i16_le();
20964        __struct.target_bearing = buf.get_i16_le();
20965        __struct.wp_dist = buf.get_u16_le();
20966        Ok(__struct)
20967    }
20968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20969        let mut __tmp = BytesMut::new(bytes);
20970        #[allow(clippy::absurd_extreme_comparisons)]
20971        #[allow(unused_comparisons)]
20972        if __tmp.remaining() < Self::ENCODED_LEN {
20973            panic!(
20974                "buffer is too small (need {} bytes, but got {})",
20975                Self::ENCODED_LEN,
20976                __tmp.remaining(),
20977            )
20978        }
20979        __tmp.put_f32_le(self.nav_roll);
20980        __tmp.put_f32_le(self.nav_pitch);
20981        __tmp.put_f32_le(self.alt_error);
20982        __tmp.put_f32_le(self.aspd_error);
20983        __tmp.put_f32_le(self.xtrack_error);
20984        __tmp.put_i16_le(self.nav_bearing);
20985        __tmp.put_i16_le(self.target_bearing);
20986        __tmp.put_u16_le(self.wp_dist);
20987        if matches!(version, MavlinkVersion::V2) {
20988            let len = __tmp.len();
20989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20990        } else {
20991            __tmp.len()
20992        }
20993    }
20994}
20995#[doc = "id: 330"]
20996#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20997#[derive(Debug, Clone, PartialEq)]
20998#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21000pub struct OBSTACLE_DISTANCE_DATA {
21001    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21002    pub time_usec: u64,
21003    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21005    pub distances: [u16; 72],
21006    #[doc = "Minimum distance the sensor can measure."]
21007    pub min_distance: u16,
21008    #[doc = "Maximum distance the sensor can measure."]
21009    pub max_distance: u16,
21010    #[doc = "Class id of the distance sensor type."]
21011    pub sensor_type: MavDistanceSensor,
21012    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21013    pub increment: u8,
21014    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21016    pub increment_f: f32,
21017    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21019    pub angle_offset: f32,
21020    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21021    #[cfg_attr(feature = "serde", serde(default))]
21022    pub frame: MavFrame,
21023}
21024impl OBSTACLE_DISTANCE_DATA {
21025    pub const ENCODED_LEN: usize = 167usize;
21026    pub const DEFAULT: Self = Self {
21027        time_usec: 0_u64,
21028        distances: [0_u16; 72usize],
21029        min_distance: 0_u16,
21030        max_distance: 0_u16,
21031        sensor_type: MavDistanceSensor::DEFAULT,
21032        increment: 0_u8,
21033        increment_f: 0.0_f32,
21034        angle_offset: 0.0_f32,
21035        frame: MavFrame::DEFAULT,
21036    };
21037    #[cfg(feature = "arbitrary")]
21038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21039        use arbitrary::{Arbitrary, Unstructured};
21040        let mut buf = [0u8; 1024];
21041        rng.fill_bytes(&mut buf);
21042        let mut unstructured = Unstructured::new(&buf);
21043        Self::arbitrary(&mut unstructured).unwrap_or_default()
21044    }
21045}
21046impl Default for OBSTACLE_DISTANCE_DATA {
21047    fn default() -> Self {
21048        Self::DEFAULT.clone()
21049    }
21050}
21051impl MessageData for OBSTACLE_DISTANCE_DATA {
21052    type Message = MavMessage;
21053    const ID: u32 = 330u32;
21054    const NAME: &'static str = "OBSTACLE_DISTANCE";
21055    const EXTRA_CRC: u8 = 23u8;
21056    const ENCODED_LEN: usize = 167usize;
21057    fn deser(
21058        _version: MavlinkVersion,
21059        __input: &[u8],
21060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21061        let avail_len = __input.len();
21062        let mut payload_buf = [0; Self::ENCODED_LEN];
21063        let mut buf = if avail_len < Self::ENCODED_LEN {
21064            payload_buf[0..avail_len].copy_from_slice(__input);
21065            Bytes::new(&payload_buf)
21066        } else {
21067            Bytes::new(__input)
21068        };
21069        let mut __struct = Self::default();
21070        __struct.time_usec = buf.get_u64_le();
21071        for v in &mut __struct.distances {
21072            let val = buf.get_u16_le();
21073            *v = val;
21074        }
21075        __struct.min_distance = buf.get_u16_le();
21076        __struct.max_distance = buf.get_u16_le();
21077        let tmp = buf.get_u8();
21078        __struct.sensor_type =
21079            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21080                enum_type: "MavDistanceSensor",
21081                value: tmp as u32,
21082            })?;
21083        __struct.increment = buf.get_u8();
21084        __struct.increment_f = buf.get_f32_le();
21085        __struct.angle_offset = buf.get_f32_le();
21086        let tmp = buf.get_u8();
21087        __struct.frame =
21088            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21089                enum_type: "MavFrame",
21090                value: tmp as u32,
21091            })?;
21092        Ok(__struct)
21093    }
21094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21095        let mut __tmp = BytesMut::new(bytes);
21096        #[allow(clippy::absurd_extreme_comparisons)]
21097        #[allow(unused_comparisons)]
21098        if __tmp.remaining() < Self::ENCODED_LEN {
21099            panic!(
21100                "buffer is too small (need {} bytes, but got {})",
21101                Self::ENCODED_LEN,
21102                __tmp.remaining(),
21103            )
21104        }
21105        __tmp.put_u64_le(self.time_usec);
21106        for val in &self.distances {
21107            __tmp.put_u16_le(*val);
21108        }
21109        __tmp.put_u16_le(self.min_distance);
21110        __tmp.put_u16_le(self.max_distance);
21111        __tmp.put_u8(self.sensor_type as u8);
21112        __tmp.put_u8(self.increment);
21113        __tmp.put_f32_le(self.increment_f);
21114        __tmp.put_f32_le(self.angle_offset);
21115        __tmp.put_u8(self.frame as u8);
21116        if matches!(version, MavlinkVersion::V2) {
21117            let len = __tmp.len();
21118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21119        } else {
21120            __tmp.len()
21121        }
21122    }
21123}
21124#[doc = "id: 331"]
21125#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21126#[derive(Debug, Clone, PartialEq)]
21127#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21128#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21129pub struct ODOMETRY_DATA {
21130    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21131    pub time_usec: u64,
21132    #[doc = "X Position"]
21133    pub x: f32,
21134    #[doc = "Y Position"]
21135    pub y: f32,
21136    #[doc = "Z Position"]
21137    pub z: f32,
21138    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21140    pub q: [f32; 4],
21141    #[doc = "X linear speed"]
21142    pub vx: f32,
21143    #[doc = "Y linear speed"]
21144    pub vy: f32,
21145    #[doc = "Z linear speed"]
21146    pub vz: f32,
21147    #[doc = "Roll angular speed"]
21148    pub rollspeed: f32,
21149    #[doc = "Pitch angular speed"]
21150    pub pitchspeed: f32,
21151    #[doc = "Yaw angular speed"]
21152    pub yawspeed: f32,
21153    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21154    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21155    pub pose_covariance: [f32; 21],
21156    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21157    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21158    pub velocity_covariance: [f32; 21],
21159    #[doc = "Coordinate frame of reference for the pose data."]
21160    pub frame_id: MavFrame,
21161    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21162    pub child_frame_id: MavFrame,
21163    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21164    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21165    pub reset_counter: u8,
21166    #[doc = "Type of estimator that is providing the odometry."]
21167    #[cfg_attr(feature = "serde", serde(default))]
21168    pub estimator_type: MavEstimatorType,
21169    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21170    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21171    pub quality: i8,
21172}
21173impl ODOMETRY_DATA {
21174    pub const ENCODED_LEN: usize = 233usize;
21175    pub const DEFAULT: Self = Self {
21176        time_usec: 0_u64,
21177        x: 0.0_f32,
21178        y: 0.0_f32,
21179        z: 0.0_f32,
21180        q: [0.0_f32; 4usize],
21181        vx: 0.0_f32,
21182        vy: 0.0_f32,
21183        vz: 0.0_f32,
21184        rollspeed: 0.0_f32,
21185        pitchspeed: 0.0_f32,
21186        yawspeed: 0.0_f32,
21187        pose_covariance: [0.0_f32; 21usize],
21188        velocity_covariance: [0.0_f32; 21usize],
21189        frame_id: MavFrame::DEFAULT,
21190        child_frame_id: MavFrame::DEFAULT,
21191        reset_counter: 0_u8,
21192        estimator_type: MavEstimatorType::DEFAULT,
21193        quality: 0_i8,
21194    };
21195    #[cfg(feature = "arbitrary")]
21196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21197        use arbitrary::{Arbitrary, Unstructured};
21198        let mut buf = [0u8; 1024];
21199        rng.fill_bytes(&mut buf);
21200        let mut unstructured = Unstructured::new(&buf);
21201        Self::arbitrary(&mut unstructured).unwrap_or_default()
21202    }
21203}
21204impl Default for ODOMETRY_DATA {
21205    fn default() -> Self {
21206        Self::DEFAULT.clone()
21207    }
21208}
21209impl MessageData for ODOMETRY_DATA {
21210    type Message = MavMessage;
21211    const ID: u32 = 331u32;
21212    const NAME: &'static str = "ODOMETRY";
21213    const EXTRA_CRC: u8 = 91u8;
21214    const ENCODED_LEN: usize = 233usize;
21215    fn deser(
21216        _version: MavlinkVersion,
21217        __input: &[u8],
21218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21219        let avail_len = __input.len();
21220        let mut payload_buf = [0; Self::ENCODED_LEN];
21221        let mut buf = if avail_len < Self::ENCODED_LEN {
21222            payload_buf[0..avail_len].copy_from_slice(__input);
21223            Bytes::new(&payload_buf)
21224        } else {
21225            Bytes::new(__input)
21226        };
21227        let mut __struct = Self::default();
21228        __struct.time_usec = buf.get_u64_le();
21229        __struct.x = buf.get_f32_le();
21230        __struct.y = buf.get_f32_le();
21231        __struct.z = buf.get_f32_le();
21232        for v in &mut __struct.q {
21233            let val = buf.get_f32_le();
21234            *v = val;
21235        }
21236        __struct.vx = buf.get_f32_le();
21237        __struct.vy = buf.get_f32_le();
21238        __struct.vz = buf.get_f32_le();
21239        __struct.rollspeed = buf.get_f32_le();
21240        __struct.pitchspeed = buf.get_f32_le();
21241        __struct.yawspeed = buf.get_f32_le();
21242        for v in &mut __struct.pose_covariance {
21243            let val = buf.get_f32_le();
21244            *v = val;
21245        }
21246        for v in &mut __struct.velocity_covariance {
21247            let val = buf.get_f32_le();
21248            *v = val;
21249        }
21250        let tmp = buf.get_u8();
21251        __struct.frame_id =
21252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21253                enum_type: "MavFrame",
21254                value: tmp as u32,
21255            })?;
21256        let tmp = buf.get_u8();
21257        __struct.child_frame_id =
21258            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21259                enum_type: "MavFrame",
21260                value: tmp as u32,
21261            })?;
21262        __struct.reset_counter = buf.get_u8();
21263        let tmp = buf.get_u8();
21264        __struct.estimator_type =
21265            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21266                enum_type: "MavEstimatorType",
21267                value: tmp as u32,
21268            })?;
21269        __struct.quality = buf.get_i8();
21270        Ok(__struct)
21271    }
21272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21273        let mut __tmp = BytesMut::new(bytes);
21274        #[allow(clippy::absurd_extreme_comparisons)]
21275        #[allow(unused_comparisons)]
21276        if __tmp.remaining() < Self::ENCODED_LEN {
21277            panic!(
21278                "buffer is too small (need {} bytes, but got {})",
21279                Self::ENCODED_LEN,
21280                __tmp.remaining(),
21281            )
21282        }
21283        __tmp.put_u64_le(self.time_usec);
21284        __tmp.put_f32_le(self.x);
21285        __tmp.put_f32_le(self.y);
21286        __tmp.put_f32_le(self.z);
21287        for val in &self.q {
21288            __tmp.put_f32_le(*val);
21289        }
21290        __tmp.put_f32_le(self.vx);
21291        __tmp.put_f32_le(self.vy);
21292        __tmp.put_f32_le(self.vz);
21293        __tmp.put_f32_le(self.rollspeed);
21294        __tmp.put_f32_le(self.pitchspeed);
21295        __tmp.put_f32_le(self.yawspeed);
21296        for val in &self.pose_covariance {
21297            __tmp.put_f32_le(*val);
21298        }
21299        for val in &self.velocity_covariance {
21300            __tmp.put_f32_le(*val);
21301        }
21302        __tmp.put_u8(self.frame_id as u8);
21303        __tmp.put_u8(self.child_frame_id as u8);
21304        __tmp.put_u8(self.reset_counter);
21305        __tmp.put_u8(self.estimator_type as u8);
21306        __tmp.put_i8(self.quality);
21307        if matches!(version, MavlinkVersion::V2) {
21308            let len = __tmp.len();
21309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21310        } else {
21311            __tmp.len()
21312        }
21313    }
21314}
21315#[doc = "id: 390"]
21316#[doc = "Hardware status sent by an onboard computer."]
21317#[derive(Debug, Clone, PartialEq)]
21318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21320pub struct ONBOARD_COMPUTER_STATUS_DATA {
21321    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21322    pub time_usec: u64,
21323    #[doc = "Time since system boot."]
21324    pub uptime: u32,
21325    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21326    pub ram_usage: u32,
21327    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21328    pub ram_total: u32,
21329    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21330    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21331    pub storage_type: [u32; 4],
21332    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21334    pub storage_usage: [u32; 4],
21335    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21336    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21337    pub storage_total: [u32; 4],
21338    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21339    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21340    pub link_type: [u32; 6],
21341    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21343    pub link_tx_rate: [u32; 6],
21344    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21346    pub link_rx_rate: [u32; 6],
21347    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21348    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21349    pub link_tx_max: [u32; 6],
21350    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21352    pub link_rx_max: [u32; 6],
21353    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21354    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21355    pub fan_speed: [i16; 4],
21356    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21357    pub mavtype: u8,
21358    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21360    pub cpu_cores: [u8; 8],
21361    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21363    pub cpu_combined: [u8; 10],
21364    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21366    pub gpu_cores: [u8; 4],
21367    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21369    pub gpu_combined: [u8; 10],
21370    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21371    pub temperature_board: i8,
21372    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21374    pub temperature_core: [i8; 8],
21375}
21376impl ONBOARD_COMPUTER_STATUS_DATA {
21377    pub const ENCODED_LEN: usize = 238usize;
21378    pub const DEFAULT: Self = Self {
21379        time_usec: 0_u64,
21380        uptime: 0_u32,
21381        ram_usage: 0_u32,
21382        ram_total: 0_u32,
21383        storage_type: [0_u32; 4usize],
21384        storage_usage: [0_u32; 4usize],
21385        storage_total: [0_u32; 4usize],
21386        link_type: [0_u32; 6usize],
21387        link_tx_rate: [0_u32; 6usize],
21388        link_rx_rate: [0_u32; 6usize],
21389        link_tx_max: [0_u32; 6usize],
21390        link_rx_max: [0_u32; 6usize],
21391        fan_speed: [0_i16; 4usize],
21392        mavtype: 0_u8,
21393        cpu_cores: [0_u8; 8usize],
21394        cpu_combined: [0_u8; 10usize],
21395        gpu_cores: [0_u8; 4usize],
21396        gpu_combined: [0_u8; 10usize],
21397        temperature_board: 0_i8,
21398        temperature_core: [0_i8; 8usize],
21399    };
21400    #[cfg(feature = "arbitrary")]
21401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21402        use arbitrary::{Arbitrary, Unstructured};
21403        let mut buf = [0u8; 1024];
21404        rng.fill_bytes(&mut buf);
21405        let mut unstructured = Unstructured::new(&buf);
21406        Self::arbitrary(&mut unstructured).unwrap_or_default()
21407    }
21408}
21409impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21410    fn default() -> Self {
21411        Self::DEFAULT.clone()
21412    }
21413}
21414impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21415    type Message = MavMessage;
21416    const ID: u32 = 390u32;
21417    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21418    const EXTRA_CRC: u8 = 156u8;
21419    const ENCODED_LEN: usize = 238usize;
21420    fn deser(
21421        _version: MavlinkVersion,
21422        __input: &[u8],
21423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21424        let avail_len = __input.len();
21425        let mut payload_buf = [0; Self::ENCODED_LEN];
21426        let mut buf = if avail_len < Self::ENCODED_LEN {
21427            payload_buf[0..avail_len].copy_from_slice(__input);
21428            Bytes::new(&payload_buf)
21429        } else {
21430            Bytes::new(__input)
21431        };
21432        let mut __struct = Self::default();
21433        __struct.time_usec = buf.get_u64_le();
21434        __struct.uptime = buf.get_u32_le();
21435        __struct.ram_usage = buf.get_u32_le();
21436        __struct.ram_total = buf.get_u32_le();
21437        for v in &mut __struct.storage_type {
21438            let val = buf.get_u32_le();
21439            *v = val;
21440        }
21441        for v in &mut __struct.storage_usage {
21442            let val = buf.get_u32_le();
21443            *v = val;
21444        }
21445        for v in &mut __struct.storage_total {
21446            let val = buf.get_u32_le();
21447            *v = val;
21448        }
21449        for v in &mut __struct.link_type {
21450            let val = buf.get_u32_le();
21451            *v = val;
21452        }
21453        for v in &mut __struct.link_tx_rate {
21454            let val = buf.get_u32_le();
21455            *v = val;
21456        }
21457        for v in &mut __struct.link_rx_rate {
21458            let val = buf.get_u32_le();
21459            *v = val;
21460        }
21461        for v in &mut __struct.link_tx_max {
21462            let val = buf.get_u32_le();
21463            *v = val;
21464        }
21465        for v in &mut __struct.link_rx_max {
21466            let val = buf.get_u32_le();
21467            *v = val;
21468        }
21469        for v in &mut __struct.fan_speed {
21470            let val = buf.get_i16_le();
21471            *v = val;
21472        }
21473        __struct.mavtype = buf.get_u8();
21474        for v in &mut __struct.cpu_cores {
21475            let val = buf.get_u8();
21476            *v = val;
21477        }
21478        for v in &mut __struct.cpu_combined {
21479            let val = buf.get_u8();
21480            *v = val;
21481        }
21482        for v in &mut __struct.gpu_cores {
21483            let val = buf.get_u8();
21484            *v = val;
21485        }
21486        for v in &mut __struct.gpu_combined {
21487            let val = buf.get_u8();
21488            *v = val;
21489        }
21490        __struct.temperature_board = buf.get_i8();
21491        for v in &mut __struct.temperature_core {
21492            let val = buf.get_i8();
21493            *v = val;
21494        }
21495        Ok(__struct)
21496    }
21497    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21498        let mut __tmp = BytesMut::new(bytes);
21499        #[allow(clippy::absurd_extreme_comparisons)]
21500        #[allow(unused_comparisons)]
21501        if __tmp.remaining() < Self::ENCODED_LEN {
21502            panic!(
21503                "buffer is too small (need {} bytes, but got {})",
21504                Self::ENCODED_LEN,
21505                __tmp.remaining(),
21506            )
21507        }
21508        __tmp.put_u64_le(self.time_usec);
21509        __tmp.put_u32_le(self.uptime);
21510        __tmp.put_u32_le(self.ram_usage);
21511        __tmp.put_u32_le(self.ram_total);
21512        for val in &self.storage_type {
21513            __tmp.put_u32_le(*val);
21514        }
21515        for val in &self.storage_usage {
21516            __tmp.put_u32_le(*val);
21517        }
21518        for val in &self.storage_total {
21519            __tmp.put_u32_le(*val);
21520        }
21521        for val in &self.link_type {
21522            __tmp.put_u32_le(*val);
21523        }
21524        for val in &self.link_tx_rate {
21525            __tmp.put_u32_le(*val);
21526        }
21527        for val in &self.link_rx_rate {
21528            __tmp.put_u32_le(*val);
21529        }
21530        for val in &self.link_tx_max {
21531            __tmp.put_u32_le(*val);
21532        }
21533        for val in &self.link_rx_max {
21534            __tmp.put_u32_le(*val);
21535        }
21536        for val in &self.fan_speed {
21537            __tmp.put_i16_le(*val);
21538        }
21539        __tmp.put_u8(self.mavtype);
21540        for val in &self.cpu_cores {
21541            __tmp.put_u8(*val);
21542        }
21543        for val in &self.cpu_combined {
21544            __tmp.put_u8(*val);
21545        }
21546        for val in &self.gpu_cores {
21547            __tmp.put_u8(*val);
21548        }
21549        for val in &self.gpu_combined {
21550            __tmp.put_u8(*val);
21551        }
21552        __tmp.put_i8(self.temperature_board);
21553        for val in &self.temperature_core {
21554            __tmp.put_i8(*val);
21555        }
21556        if matches!(version, MavlinkVersion::V2) {
21557            let len = __tmp.len();
21558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21559        } else {
21560            __tmp.len()
21561        }
21562    }
21563}
21564#[doc = "id: 12918"]
21565#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21566#[derive(Debug, Clone, PartialEq)]
21567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21569pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21570    #[doc = "Status level indicating if arming is allowed."]
21571    pub status: MavOdidArmStatus,
21572    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21573    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21574    pub error: [u8; 50],
21575}
21576impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21577    pub const ENCODED_LEN: usize = 51usize;
21578    pub const DEFAULT: Self = Self {
21579        status: MavOdidArmStatus::DEFAULT,
21580        error: [0_u8; 50usize],
21581    };
21582    #[cfg(feature = "arbitrary")]
21583    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21584        use arbitrary::{Arbitrary, Unstructured};
21585        let mut buf = [0u8; 1024];
21586        rng.fill_bytes(&mut buf);
21587        let mut unstructured = Unstructured::new(&buf);
21588        Self::arbitrary(&mut unstructured).unwrap_or_default()
21589    }
21590}
21591impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21592    fn default() -> Self {
21593        Self::DEFAULT.clone()
21594    }
21595}
21596impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21597    type Message = MavMessage;
21598    const ID: u32 = 12918u32;
21599    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21600    const EXTRA_CRC: u8 = 139u8;
21601    const ENCODED_LEN: usize = 51usize;
21602    fn deser(
21603        _version: MavlinkVersion,
21604        __input: &[u8],
21605    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21606        let avail_len = __input.len();
21607        let mut payload_buf = [0; Self::ENCODED_LEN];
21608        let mut buf = if avail_len < Self::ENCODED_LEN {
21609            payload_buf[0..avail_len].copy_from_slice(__input);
21610            Bytes::new(&payload_buf)
21611        } else {
21612            Bytes::new(__input)
21613        };
21614        let mut __struct = Self::default();
21615        let tmp = buf.get_u8();
21616        __struct.status =
21617            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21618                enum_type: "MavOdidArmStatus",
21619                value: tmp as u32,
21620            })?;
21621        for v in &mut __struct.error {
21622            let val = buf.get_u8();
21623            *v = val;
21624        }
21625        Ok(__struct)
21626    }
21627    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21628        let mut __tmp = BytesMut::new(bytes);
21629        #[allow(clippy::absurd_extreme_comparisons)]
21630        #[allow(unused_comparisons)]
21631        if __tmp.remaining() < Self::ENCODED_LEN {
21632            panic!(
21633                "buffer is too small (need {} bytes, but got {})",
21634                Self::ENCODED_LEN,
21635                __tmp.remaining(),
21636            )
21637        }
21638        __tmp.put_u8(self.status as u8);
21639        for val in &self.error {
21640            __tmp.put_u8(*val);
21641        }
21642        if matches!(version, MavlinkVersion::V2) {
21643            let len = __tmp.len();
21644            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21645        } else {
21646            __tmp.len()
21647        }
21648    }
21649}
21650#[doc = "id: 12902"]
21651#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21652#[derive(Debug, Clone, PartialEq)]
21653#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21654#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21655pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21656    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21657    pub timestamp: u32,
21658    #[doc = "System ID (0 for broadcast)."]
21659    pub target_system: u8,
21660    #[doc = "Component ID (0 for broadcast)."]
21661    pub target_component: u8,
21662    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21663    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21664    pub id_or_mac: [u8; 20],
21665    #[doc = "Indicates the type of authentication."]
21666    pub authentication_type: MavOdidAuthType,
21667    #[doc = "Allowed range is 0 - 15."]
21668    pub data_page: u8,
21669    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21670    pub last_page_index: u8,
21671    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21672    pub length: u8,
21673    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21674    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21675    pub authentication_data: [u8; 23],
21676}
21677impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21678    pub const ENCODED_LEN: usize = 53usize;
21679    pub const DEFAULT: Self = Self {
21680        timestamp: 0_u32,
21681        target_system: 0_u8,
21682        target_component: 0_u8,
21683        id_or_mac: [0_u8; 20usize],
21684        authentication_type: MavOdidAuthType::DEFAULT,
21685        data_page: 0_u8,
21686        last_page_index: 0_u8,
21687        length: 0_u8,
21688        authentication_data: [0_u8; 23usize],
21689    };
21690    #[cfg(feature = "arbitrary")]
21691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21692        use arbitrary::{Arbitrary, Unstructured};
21693        let mut buf = [0u8; 1024];
21694        rng.fill_bytes(&mut buf);
21695        let mut unstructured = Unstructured::new(&buf);
21696        Self::arbitrary(&mut unstructured).unwrap_or_default()
21697    }
21698}
21699impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21700    fn default() -> Self {
21701        Self::DEFAULT.clone()
21702    }
21703}
21704impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21705    type Message = MavMessage;
21706    const ID: u32 = 12902u32;
21707    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21708    const EXTRA_CRC: u8 = 140u8;
21709    const ENCODED_LEN: usize = 53usize;
21710    fn deser(
21711        _version: MavlinkVersion,
21712        __input: &[u8],
21713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21714        let avail_len = __input.len();
21715        let mut payload_buf = [0; Self::ENCODED_LEN];
21716        let mut buf = if avail_len < Self::ENCODED_LEN {
21717            payload_buf[0..avail_len].copy_from_slice(__input);
21718            Bytes::new(&payload_buf)
21719        } else {
21720            Bytes::new(__input)
21721        };
21722        let mut __struct = Self::default();
21723        __struct.timestamp = buf.get_u32_le();
21724        __struct.target_system = buf.get_u8();
21725        __struct.target_component = buf.get_u8();
21726        for v in &mut __struct.id_or_mac {
21727            let val = buf.get_u8();
21728            *v = val;
21729        }
21730        let tmp = buf.get_u8();
21731        __struct.authentication_type =
21732            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21733                enum_type: "MavOdidAuthType",
21734                value: tmp as u32,
21735            })?;
21736        __struct.data_page = buf.get_u8();
21737        __struct.last_page_index = buf.get_u8();
21738        __struct.length = buf.get_u8();
21739        for v in &mut __struct.authentication_data {
21740            let val = buf.get_u8();
21741            *v = val;
21742        }
21743        Ok(__struct)
21744    }
21745    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21746        let mut __tmp = BytesMut::new(bytes);
21747        #[allow(clippy::absurd_extreme_comparisons)]
21748        #[allow(unused_comparisons)]
21749        if __tmp.remaining() < Self::ENCODED_LEN {
21750            panic!(
21751                "buffer is too small (need {} bytes, but got {})",
21752                Self::ENCODED_LEN,
21753                __tmp.remaining(),
21754            )
21755        }
21756        __tmp.put_u32_le(self.timestamp);
21757        __tmp.put_u8(self.target_system);
21758        __tmp.put_u8(self.target_component);
21759        for val in &self.id_or_mac {
21760            __tmp.put_u8(*val);
21761        }
21762        __tmp.put_u8(self.authentication_type as u8);
21763        __tmp.put_u8(self.data_page);
21764        __tmp.put_u8(self.last_page_index);
21765        __tmp.put_u8(self.length);
21766        for val in &self.authentication_data {
21767            __tmp.put_u8(*val);
21768        }
21769        if matches!(version, MavlinkVersion::V2) {
21770            let len = __tmp.len();
21771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21772        } else {
21773            __tmp.len()
21774        }
21775    }
21776}
21777#[doc = "id: 12900"]
21778#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21779#[derive(Debug, Clone, PartialEq)]
21780#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21782pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21783    #[doc = "System ID (0 for broadcast)."]
21784    pub target_system: u8,
21785    #[doc = "Component ID (0 for broadcast)."]
21786    pub target_component: u8,
21787    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21788    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21789    pub id_or_mac: [u8; 20],
21790    #[doc = "Indicates the format for the uas_id field of this message."]
21791    pub id_type: MavOdidIdType,
21792    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21793    pub ua_type: MavOdidUaType,
21794    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21795    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21796    pub uas_id: [u8; 20],
21797}
21798impl OPEN_DRONE_ID_BASIC_ID_DATA {
21799    pub const ENCODED_LEN: usize = 44usize;
21800    pub const DEFAULT: Self = Self {
21801        target_system: 0_u8,
21802        target_component: 0_u8,
21803        id_or_mac: [0_u8; 20usize],
21804        id_type: MavOdidIdType::DEFAULT,
21805        ua_type: MavOdidUaType::DEFAULT,
21806        uas_id: [0_u8; 20usize],
21807    };
21808    #[cfg(feature = "arbitrary")]
21809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21810        use arbitrary::{Arbitrary, Unstructured};
21811        let mut buf = [0u8; 1024];
21812        rng.fill_bytes(&mut buf);
21813        let mut unstructured = Unstructured::new(&buf);
21814        Self::arbitrary(&mut unstructured).unwrap_or_default()
21815    }
21816}
21817impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21818    fn default() -> Self {
21819        Self::DEFAULT.clone()
21820    }
21821}
21822impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21823    type Message = MavMessage;
21824    const ID: u32 = 12900u32;
21825    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21826    const EXTRA_CRC: u8 = 114u8;
21827    const ENCODED_LEN: usize = 44usize;
21828    fn deser(
21829        _version: MavlinkVersion,
21830        __input: &[u8],
21831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21832        let avail_len = __input.len();
21833        let mut payload_buf = [0; Self::ENCODED_LEN];
21834        let mut buf = if avail_len < Self::ENCODED_LEN {
21835            payload_buf[0..avail_len].copy_from_slice(__input);
21836            Bytes::new(&payload_buf)
21837        } else {
21838            Bytes::new(__input)
21839        };
21840        let mut __struct = Self::default();
21841        __struct.target_system = buf.get_u8();
21842        __struct.target_component = buf.get_u8();
21843        for v in &mut __struct.id_or_mac {
21844            let val = buf.get_u8();
21845            *v = val;
21846        }
21847        let tmp = buf.get_u8();
21848        __struct.id_type =
21849            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21850                enum_type: "MavOdidIdType",
21851                value: tmp as u32,
21852            })?;
21853        let tmp = buf.get_u8();
21854        __struct.ua_type =
21855            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21856                enum_type: "MavOdidUaType",
21857                value: tmp as u32,
21858            })?;
21859        for v in &mut __struct.uas_id {
21860            let val = buf.get_u8();
21861            *v = val;
21862        }
21863        Ok(__struct)
21864    }
21865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21866        let mut __tmp = BytesMut::new(bytes);
21867        #[allow(clippy::absurd_extreme_comparisons)]
21868        #[allow(unused_comparisons)]
21869        if __tmp.remaining() < Self::ENCODED_LEN {
21870            panic!(
21871                "buffer is too small (need {} bytes, but got {})",
21872                Self::ENCODED_LEN,
21873                __tmp.remaining(),
21874            )
21875        }
21876        __tmp.put_u8(self.target_system);
21877        __tmp.put_u8(self.target_component);
21878        for val in &self.id_or_mac {
21879            __tmp.put_u8(*val);
21880        }
21881        __tmp.put_u8(self.id_type as u8);
21882        __tmp.put_u8(self.ua_type as u8);
21883        for val in &self.uas_id {
21884            __tmp.put_u8(*val);
21885        }
21886        if matches!(version, MavlinkVersion::V2) {
21887            let len = __tmp.len();
21888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21889        } else {
21890            __tmp.len()
21891        }
21892    }
21893}
21894#[doc = "id: 12901"]
21895#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21896#[derive(Debug, Clone, PartialEq)]
21897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21899pub struct OPEN_DRONE_ID_LOCATION_DATA {
21900    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21901    pub latitude: i32,
21902    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21903    pub longitude: i32,
21904    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21905    pub altitude_barometric: f32,
21906    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21907    pub altitude_geodetic: f32,
21908    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21909    pub height: f32,
21910    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21911    pub timestamp: f32,
21912    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21913    pub direction: u16,
21914    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21915    pub speed_horizontal: u16,
21916    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21917    pub speed_vertical: i16,
21918    #[doc = "System ID (0 for broadcast)."]
21919    pub target_system: u8,
21920    #[doc = "Component ID (0 for broadcast)."]
21921    pub target_component: u8,
21922    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21923    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21924    pub id_or_mac: [u8; 20],
21925    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21926    pub status: MavOdidStatus,
21927    #[doc = "Indicates the reference point for the height field."]
21928    pub height_reference: MavOdidHeightRef,
21929    #[doc = "The accuracy of the horizontal position."]
21930    pub horizontal_accuracy: MavOdidHorAcc,
21931    #[doc = "The accuracy of the vertical position."]
21932    pub vertical_accuracy: MavOdidVerAcc,
21933    #[doc = "The accuracy of the barometric altitude."]
21934    pub barometer_accuracy: MavOdidVerAcc,
21935    #[doc = "The accuracy of the horizontal and vertical speed."]
21936    pub speed_accuracy: MavOdidSpeedAcc,
21937    #[doc = "The accuracy of the timestamps."]
21938    pub timestamp_accuracy: MavOdidTimeAcc,
21939}
21940impl OPEN_DRONE_ID_LOCATION_DATA {
21941    pub const ENCODED_LEN: usize = 59usize;
21942    pub const DEFAULT: Self = Self {
21943        latitude: 0_i32,
21944        longitude: 0_i32,
21945        altitude_barometric: 0.0_f32,
21946        altitude_geodetic: 0.0_f32,
21947        height: 0.0_f32,
21948        timestamp: 0.0_f32,
21949        direction: 0_u16,
21950        speed_horizontal: 0_u16,
21951        speed_vertical: 0_i16,
21952        target_system: 0_u8,
21953        target_component: 0_u8,
21954        id_or_mac: [0_u8; 20usize],
21955        status: MavOdidStatus::DEFAULT,
21956        height_reference: MavOdidHeightRef::DEFAULT,
21957        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21958        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21959        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21960        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21961        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21962    };
21963    #[cfg(feature = "arbitrary")]
21964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21965        use arbitrary::{Arbitrary, Unstructured};
21966        let mut buf = [0u8; 1024];
21967        rng.fill_bytes(&mut buf);
21968        let mut unstructured = Unstructured::new(&buf);
21969        Self::arbitrary(&mut unstructured).unwrap_or_default()
21970    }
21971}
21972impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21973    fn default() -> Self {
21974        Self::DEFAULT.clone()
21975    }
21976}
21977impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21978    type Message = MavMessage;
21979    const ID: u32 = 12901u32;
21980    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21981    const EXTRA_CRC: u8 = 254u8;
21982    const ENCODED_LEN: usize = 59usize;
21983    fn deser(
21984        _version: MavlinkVersion,
21985        __input: &[u8],
21986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21987        let avail_len = __input.len();
21988        let mut payload_buf = [0; Self::ENCODED_LEN];
21989        let mut buf = if avail_len < Self::ENCODED_LEN {
21990            payload_buf[0..avail_len].copy_from_slice(__input);
21991            Bytes::new(&payload_buf)
21992        } else {
21993            Bytes::new(__input)
21994        };
21995        let mut __struct = Self::default();
21996        __struct.latitude = buf.get_i32_le();
21997        __struct.longitude = buf.get_i32_le();
21998        __struct.altitude_barometric = buf.get_f32_le();
21999        __struct.altitude_geodetic = buf.get_f32_le();
22000        __struct.height = buf.get_f32_le();
22001        __struct.timestamp = buf.get_f32_le();
22002        __struct.direction = buf.get_u16_le();
22003        __struct.speed_horizontal = buf.get_u16_le();
22004        __struct.speed_vertical = buf.get_i16_le();
22005        __struct.target_system = buf.get_u8();
22006        __struct.target_component = buf.get_u8();
22007        for v in &mut __struct.id_or_mac {
22008            let val = buf.get_u8();
22009            *v = val;
22010        }
22011        let tmp = buf.get_u8();
22012        __struct.status =
22013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22014                enum_type: "MavOdidStatus",
22015                value: tmp as u32,
22016            })?;
22017        let tmp = buf.get_u8();
22018        __struct.height_reference =
22019            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22020                enum_type: "MavOdidHeightRef",
22021                value: tmp as u32,
22022            })?;
22023        let tmp = buf.get_u8();
22024        __struct.horizontal_accuracy =
22025            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22026                enum_type: "MavOdidHorAcc",
22027                value: tmp as u32,
22028            })?;
22029        let tmp = buf.get_u8();
22030        __struct.vertical_accuracy =
22031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22032                enum_type: "MavOdidVerAcc",
22033                value: tmp as u32,
22034            })?;
22035        let tmp = buf.get_u8();
22036        __struct.barometer_accuracy =
22037            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22038                enum_type: "MavOdidVerAcc",
22039                value: tmp as u32,
22040            })?;
22041        let tmp = buf.get_u8();
22042        __struct.speed_accuracy =
22043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22044                enum_type: "MavOdidSpeedAcc",
22045                value: tmp as u32,
22046            })?;
22047        let tmp = buf.get_u8();
22048        __struct.timestamp_accuracy =
22049            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22050                enum_type: "MavOdidTimeAcc",
22051                value: tmp as u32,
22052            })?;
22053        Ok(__struct)
22054    }
22055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22056        let mut __tmp = BytesMut::new(bytes);
22057        #[allow(clippy::absurd_extreme_comparisons)]
22058        #[allow(unused_comparisons)]
22059        if __tmp.remaining() < Self::ENCODED_LEN {
22060            panic!(
22061                "buffer is too small (need {} bytes, but got {})",
22062                Self::ENCODED_LEN,
22063                __tmp.remaining(),
22064            )
22065        }
22066        __tmp.put_i32_le(self.latitude);
22067        __tmp.put_i32_le(self.longitude);
22068        __tmp.put_f32_le(self.altitude_barometric);
22069        __tmp.put_f32_le(self.altitude_geodetic);
22070        __tmp.put_f32_le(self.height);
22071        __tmp.put_f32_le(self.timestamp);
22072        __tmp.put_u16_le(self.direction);
22073        __tmp.put_u16_le(self.speed_horizontal);
22074        __tmp.put_i16_le(self.speed_vertical);
22075        __tmp.put_u8(self.target_system);
22076        __tmp.put_u8(self.target_component);
22077        for val in &self.id_or_mac {
22078            __tmp.put_u8(*val);
22079        }
22080        __tmp.put_u8(self.status as u8);
22081        __tmp.put_u8(self.height_reference as u8);
22082        __tmp.put_u8(self.horizontal_accuracy as u8);
22083        __tmp.put_u8(self.vertical_accuracy as u8);
22084        __tmp.put_u8(self.barometer_accuracy as u8);
22085        __tmp.put_u8(self.speed_accuracy as u8);
22086        __tmp.put_u8(self.timestamp_accuracy as u8);
22087        if matches!(version, MavlinkVersion::V2) {
22088            let len = __tmp.len();
22089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22090        } else {
22091            __tmp.len()
22092        }
22093    }
22094}
22095#[doc = "id: 12915"]
22096#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22097#[derive(Debug, Clone, PartialEq)]
22098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22100pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22101    #[doc = "System ID (0 for broadcast)."]
22102    pub target_system: u8,
22103    #[doc = "Component ID (0 for broadcast)."]
22104    pub target_component: u8,
22105    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22107    pub id_or_mac: [u8; 20],
22108    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22109    pub single_message_size: u8,
22110    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22111    pub msg_pack_size: u8,
22112    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22113    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22114    pub messages: [u8; 225],
22115}
22116impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22117    pub const ENCODED_LEN: usize = 249usize;
22118    pub const DEFAULT: Self = Self {
22119        target_system: 0_u8,
22120        target_component: 0_u8,
22121        id_or_mac: [0_u8; 20usize],
22122        single_message_size: 0_u8,
22123        msg_pack_size: 0_u8,
22124        messages: [0_u8; 225usize],
22125    };
22126    #[cfg(feature = "arbitrary")]
22127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22128        use arbitrary::{Arbitrary, Unstructured};
22129        let mut buf = [0u8; 1024];
22130        rng.fill_bytes(&mut buf);
22131        let mut unstructured = Unstructured::new(&buf);
22132        Self::arbitrary(&mut unstructured).unwrap_or_default()
22133    }
22134}
22135impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22136    fn default() -> Self {
22137        Self::DEFAULT.clone()
22138    }
22139}
22140impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22141    type Message = MavMessage;
22142    const ID: u32 = 12915u32;
22143    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22144    const EXTRA_CRC: u8 = 94u8;
22145    const ENCODED_LEN: usize = 249usize;
22146    fn deser(
22147        _version: MavlinkVersion,
22148        __input: &[u8],
22149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22150        let avail_len = __input.len();
22151        let mut payload_buf = [0; Self::ENCODED_LEN];
22152        let mut buf = if avail_len < Self::ENCODED_LEN {
22153            payload_buf[0..avail_len].copy_from_slice(__input);
22154            Bytes::new(&payload_buf)
22155        } else {
22156            Bytes::new(__input)
22157        };
22158        let mut __struct = Self::default();
22159        __struct.target_system = buf.get_u8();
22160        __struct.target_component = buf.get_u8();
22161        for v in &mut __struct.id_or_mac {
22162            let val = buf.get_u8();
22163            *v = val;
22164        }
22165        __struct.single_message_size = buf.get_u8();
22166        __struct.msg_pack_size = buf.get_u8();
22167        for v in &mut __struct.messages {
22168            let val = buf.get_u8();
22169            *v = val;
22170        }
22171        Ok(__struct)
22172    }
22173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22174        let mut __tmp = BytesMut::new(bytes);
22175        #[allow(clippy::absurd_extreme_comparisons)]
22176        #[allow(unused_comparisons)]
22177        if __tmp.remaining() < Self::ENCODED_LEN {
22178            panic!(
22179                "buffer is too small (need {} bytes, but got {})",
22180                Self::ENCODED_LEN,
22181                __tmp.remaining(),
22182            )
22183        }
22184        __tmp.put_u8(self.target_system);
22185        __tmp.put_u8(self.target_component);
22186        for val in &self.id_or_mac {
22187            __tmp.put_u8(*val);
22188        }
22189        __tmp.put_u8(self.single_message_size);
22190        __tmp.put_u8(self.msg_pack_size);
22191        for val in &self.messages {
22192            __tmp.put_u8(*val);
22193        }
22194        if matches!(version, MavlinkVersion::V2) {
22195            let len = __tmp.len();
22196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22197        } else {
22198            __tmp.len()
22199        }
22200    }
22201}
22202#[doc = "id: 12905"]
22203#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22204#[derive(Debug, Clone, PartialEq)]
22205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22207pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22208    #[doc = "System ID (0 for broadcast)."]
22209    pub target_system: u8,
22210    #[doc = "Component ID (0 for broadcast)."]
22211    pub target_component: u8,
22212    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22213    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22214    pub id_or_mac: [u8; 20],
22215    #[doc = "Indicates the type of the operator_id field."]
22216    pub operator_id_type: MavOdidOperatorIdType,
22217    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22218    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22219    pub operator_id: [u8; 20],
22220}
22221impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22222    pub const ENCODED_LEN: usize = 43usize;
22223    pub const DEFAULT: Self = Self {
22224        target_system: 0_u8,
22225        target_component: 0_u8,
22226        id_or_mac: [0_u8; 20usize],
22227        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22228        operator_id: [0_u8; 20usize],
22229    };
22230    #[cfg(feature = "arbitrary")]
22231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22232        use arbitrary::{Arbitrary, Unstructured};
22233        let mut buf = [0u8; 1024];
22234        rng.fill_bytes(&mut buf);
22235        let mut unstructured = Unstructured::new(&buf);
22236        Self::arbitrary(&mut unstructured).unwrap_or_default()
22237    }
22238}
22239impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22240    fn default() -> Self {
22241        Self::DEFAULT.clone()
22242    }
22243}
22244impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22245    type Message = MavMessage;
22246    const ID: u32 = 12905u32;
22247    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22248    const EXTRA_CRC: u8 = 49u8;
22249    const ENCODED_LEN: usize = 43usize;
22250    fn deser(
22251        _version: MavlinkVersion,
22252        __input: &[u8],
22253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22254        let avail_len = __input.len();
22255        let mut payload_buf = [0; Self::ENCODED_LEN];
22256        let mut buf = if avail_len < Self::ENCODED_LEN {
22257            payload_buf[0..avail_len].copy_from_slice(__input);
22258            Bytes::new(&payload_buf)
22259        } else {
22260            Bytes::new(__input)
22261        };
22262        let mut __struct = Self::default();
22263        __struct.target_system = buf.get_u8();
22264        __struct.target_component = buf.get_u8();
22265        for v in &mut __struct.id_or_mac {
22266            let val = buf.get_u8();
22267            *v = val;
22268        }
22269        let tmp = buf.get_u8();
22270        __struct.operator_id_type =
22271            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22272                enum_type: "MavOdidOperatorIdType",
22273                value: tmp as u32,
22274            })?;
22275        for v in &mut __struct.operator_id {
22276            let val = buf.get_u8();
22277            *v = val;
22278        }
22279        Ok(__struct)
22280    }
22281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22282        let mut __tmp = BytesMut::new(bytes);
22283        #[allow(clippy::absurd_extreme_comparisons)]
22284        #[allow(unused_comparisons)]
22285        if __tmp.remaining() < Self::ENCODED_LEN {
22286            panic!(
22287                "buffer is too small (need {} bytes, but got {})",
22288                Self::ENCODED_LEN,
22289                __tmp.remaining(),
22290            )
22291        }
22292        __tmp.put_u8(self.target_system);
22293        __tmp.put_u8(self.target_component);
22294        for val in &self.id_or_mac {
22295            __tmp.put_u8(*val);
22296        }
22297        __tmp.put_u8(self.operator_id_type as u8);
22298        for val in &self.operator_id {
22299            __tmp.put_u8(*val);
22300        }
22301        if matches!(version, MavlinkVersion::V2) {
22302            let len = __tmp.len();
22303            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22304        } else {
22305            __tmp.len()
22306        }
22307    }
22308}
22309#[doc = "id: 12903"]
22310#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22311#[derive(Debug, Clone, PartialEq)]
22312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22314pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22315    #[doc = "System ID (0 for broadcast)."]
22316    pub target_system: u8,
22317    #[doc = "Component ID (0 for broadcast)."]
22318    pub target_component: u8,
22319    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22321    pub id_or_mac: [u8; 20],
22322    #[doc = "Indicates the type of the description field."]
22323    pub description_type: MavOdidDescType,
22324    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22326    pub description: [u8; 23],
22327}
22328impl OPEN_DRONE_ID_SELF_ID_DATA {
22329    pub const ENCODED_LEN: usize = 46usize;
22330    pub const DEFAULT: Self = Self {
22331        target_system: 0_u8,
22332        target_component: 0_u8,
22333        id_or_mac: [0_u8; 20usize],
22334        description_type: MavOdidDescType::DEFAULT,
22335        description: [0_u8; 23usize],
22336    };
22337    #[cfg(feature = "arbitrary")]
22338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22339        use arbitrary::{Arbitrary, Unstructured};
22340        let mut buf = [0u8; 1024];
22341        rng.fill_bytes(&mut buf);
22342        let mut unstructured = Unstructured::new(&buf);
22343        Self::arbitrary(&mut unstructured).unwrap_or_default()
22344    }
22345}
22346impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22347    fn default() -> Self {
22348        Self::DEFAULT.clone()
22349    }
22350}
22351impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22352    type Message = MavMessage;
22353    const ID: u32 = 12903u32;
22354    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22355    const EXTRA_CRC: u8 = 249u8;
22356    const ENCODED_LEN: usize = 46usize;
22357    fn deser(
22358        _version: MavlinkVersion,
22359        __input: &[u8],
22360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22361        let avail_len = __input.len();
22362        let mut payload_buf = [0; Self::ENCODED_LEN];
22363        let mut buf = if avail_len < Self::ENCODED_LEN {
22364            payload_buf[0..avail_len].copy_from_slice(__input);
22365            Bytes::new(&payload_buf)
22366        } else {
22367            Bytes::new(__input)
22368        };
22369        let mut __struct = Self::default();
22370        __struct.target_system = buf.get_u8();
22371        __struct.target_component = buf.get_u8();
22372        for v in &mut __struct.id_or_mac {
22373            let val = buf.get_u8();
22374            *v = val;
22375        }
22376        let tmp = buf.get_u8();
22377        __struct.description_type =
22378            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22379                enum_type: "MavOdidDescType",
22380                value: tmp as u32,
22381            })?;
22382        for v in &mut __struct.description {
22383            let val = buf.get_u8();
22384            *v = val;
22385        }
22386        Ok(__struct)
22387    }
22388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22389        let mut __tmp = BytesMut::new(bytes);
22390        #[allow(clippy::absurd_extreme_comparisons)]
22391        #[allow(unused_comparisons)]
22392        if __tmp.remaining() < Self::ENCODED_LEN {
22393            panic!(
22394                "buffer is too small (need {} bytes, but got {})",
22395                Self::ENCODED_LEN,
22396                __tmp.remaining(),
22397            )
22398        }
22399        __tmp.put_u8(self.target_system);
22400        __tmp.put_u8(self.target_component);
22401        for val in &self.id_or_mac {
22402            __tmp.put_u8(*val);
22403        }
22404        __tmp.put_u8(self.description_type as u8);
22405        for val in &self.description {
22406            __tmp.put_u8(*val);
22407        }
22408        if matches!(version, MavlinkVersion::V2) {
22409            let len = __tmp.len();
22410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22411        } else {
22412            __tmp.len()
22413        }
22414    }
22415}
22416#[doc = "id: 12904"]
22417#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22418#[derive(Debug, Clone, PartialEq)]
22419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22421pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22422    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22423    pub operator_latitude: i32,
22424    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22425    pub operator_longitude: i32,
22426    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22427    pub area_ceiling: f32,
22428    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22429    pub area_floor: f32,
22430    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22431    pub operator_altitude_geo: f32,
22432    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22433    pub timestamp: u32,
22434    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22435    pub area_count: u16,
22436    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22437    pub area_radius: u16,
22438    #[doc = "System ID (0 for broadcast)."]
22439    pub target_system: u8,
22440    #[doc = "Component ID (0 for broadcast)."]
22441    pub target_component: u8,
22442    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22443    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22444    pub id_or_mac: [u8; 20],
22445    #[doc = "Specifies the operator location type."]
22446    pub operator_location_type: MavOdidOperatorLocationType,
22447    #[doc = "Specifies the classification type of the UA."]
22448    pub classification_type: MavOdidClassificationType,
22449    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22450    pub category_eu: MavOdidCategoryEu,
22451    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22452    pub class_eu: MavOdidClassEu,
22453}
22454impl OPEN_DRONE_ID_SYSTEM_DATA {
22455    pub const ENCODED_LEN: usize = 54usize;
22456    pub const DEFAULT: Self = Self {
22457        operator_latitude: 0_i32,
22458        operator_longitude: 0_i32,
22459        area_ceiling: 0.0_f32,
22460        area_floor: 0.0_f32,
22461        operator_altitude_geo: 0.0_f32,
22462        timestamp: 0_u32,
22463        area_count: 0_u16,
22464        area_radius: 0_u16,
22465        target_system: 0_u8,
22466        target_component: 0_u8,
22467        id_or_mac: [0_u8; 20usize],
22468        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22469        classification_type: MavOdidClassificationType::DEFAULT,
22470        category_eu: MavOdidCategoryEu::DEFAULT,
22471        class_eu: MavOdidClassEu::DEFAULT,
22472    };
22473    #[cfg(feature = "arbitrary")]
22474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22475        use arbitrary::{Arbitrary, Unstructured};
22476        let mut buf = [0u8; 1024];
22477        rng.fill_bytes(&mut buf);
22478        let mut unstructured = Unstructured::new(&buf);
22479        Self::arbitrary(&mut unstructured).unwrap_or_default()
22480    }
22481}
22482impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22483    fn default() -> Self {
22484        Self::DEFAULT.clone()
22485    }
22486}
22487impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22488    type Message = MavMessage;
22489    const ID: u32 = 12904u32;
22490    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22491    const EXTRA_CRC: u8 = 77u8;
22492    const ENCODED_LEN: usize = 54usize;
22493    fn deser(
22494        _version: MavlinkVersion,
22495        __input: &[u8],
22496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22497        let avail_len = __input.len();
22498        let mut payload_buf = [0; Self::ENCODED_LEN];
22499        let mut buf = if avail_len < Self::ENCODED_LEN {
22500            payload_buf[0..avail_len].copy_from_slice(__input);
22501            Bytes::new(&payload_buf)
22502        } else {
22503            Bytes::new(__input)
22504        };
22505        let mut __struct = Self::default();
22506        __struct.operator_latitude = buf.get_i32_le();
22507        __struct.operator_longitude = buf.get_i32_le();
22508        __struct.area_ceiling = buf.get_f32_le();
22509        __struct.area_floor = buf.get_f32_le();
22510        __struct.operator_altitude_geo = buf.get_f32_le();
22511        __struct.timestamp = buf.get_u32_le();
22512        __struct.area_count = buf.get_u16_le();
22513        __struct.area_radius = buf.get_u16_le();
22514        __struct.target_system = buf.get_u8();
22515        __struct.target_component = buf.get_u8();
22516        for v in &mut __struct.id_or_mac {
22517            let val = buf.get_u8();
22518            *v = val;
22519        }
22520        let tmp = buf.get_u8();
22521        __struct.operator_location_type =
22522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22523                enum_type: "MavOdidOperatorLocationType",
22524                value: tmp as u32,
22525            })?;
22526        let tmp = buf.get_u8();
22527        __struct.classification_type =
22528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22529                enum_type: "MavOdidClassificationType",
22530                value: tmp as u32,
22531            })?;
22532        let tmp = buf.get_u8();
22533        __struct.category_eu =
22534            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22535                enum_type: "MavOdidCategoryEu",
22536                value: tmp as u32,
22537            })?;
22538        let tmp = buf.get_u8();
22539        __struct.class_eu =
22540            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22541                enum_type: "MavOdidClassEu",
22542                value: tmp as u32,
22543            })?;
22544        Ok(__struct)
22545    }
22546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22547        let mut __tmp = BytesMut::new(bytes);
22548        #[allow(clippy::absurd_extreme_comparisons)]
22549        #[allow(unused_comparisons)]
22550        if __tmp.remaining() < Self::ENCODED_LEN {
22551            panic!(
22552                "buffer is too small (need {} bytes, but got {})",
22553                Self::ENCODED_LEN,
22554                __tmp.remaining(),
22555            )
22556        }
22557        __tmp.put_i32_le(self.operator_latitude);
22558        __tmp.put_i32_le(self.operator_longitude);
22559        __tmp.put_f32_le(self.area_ceiling);
22560        __tmp.put_f32_le(self.area_floor);
22561        __tmp.put_f32_le(self.operator_altitude_geo);
22562        __tmp.put_u32_le(self.timestamp);
22563        __tmp.put_u16_le(self.area_count);
22564        __tmp.put_u16_le(self.area_radius);
22565        __tmp.put_u8(self.target_system);
22566        __tmp.put_u8(self.target_component);
22567        for val in &self.id_or_mac {
22568            __tmp.put_u8(*val);
22569        }
22570        __tmp.put_u8(self.operator_location_type as u8);
22571        __tmp.put_u8(self.classification_type as u8);
22572        __tmp.put_u8(self.category_eu as u8);
22573        __tmp.put_u8(self.class_eu as u8);
22574        if matches!(version, MavlinkVersion::V2) {
22575            let len = __tmp.len();
22576            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22577        } else {
22578            __tmp.len()
22579        }
22580    }
22581}
22582#[doc = "id: 12919"]
22583#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22584#[derive(Debug, Clone, PartialEq)]
22585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22587pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22588    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22589    pub operator_latitude: i32,
22590    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22591    pub operator_longitude: i32,
22592    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22593    pub operator_altitude_geo: f32,
22594    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22595    pub timestamp: u32,
22596    #[doc = "System ID (0 for broadcast)."]
22597    pub target_system: u8,
22598    #[doc = "Component ID (0 for broadcast)."]
22599    pub target_component: u8,
22600}
22601impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22602    pub const ENCODED_LEN: usize = 18usize;
22603    pub const DEFAULT: Self = Self {
22604        operator_latitude: 0_i32,
22605        operator_longitude: 0_i32,
22606        operator_altitude_geo: 0.0_f32,
22607        timestamp: 0_u32,
22608        target_system: 0_u8,
22609        target_component: 0_u8,
22610    };
22611    #[cfg(feature = "arbitrary")]
22612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22613        use arbitrary::{Arbitrary, Unstructured};
22614        let mut buf = [0u8; 1024];
22615        rng.fill_bytes(&mut buf);
22616        let mut unstructured = Unstructured::new(&buf);
22617        Self::arbitrary(&mut unstructured).unwrap_or_default()
22618    }
22619}
22620impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22621    fn default() -> Self {
22622        Self::DEFAULT.clone()
22623    }
22624}
22625impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22626    type Message = MavMessage;
22627    const ID: u32 = 12919u32;
22628    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22629    const EXTRA_CRC: u8 = 7u8;
22630    const ENCODED_LEN: usize = 18usize;
22631    fn deser(
22632        _version: MavlinkVersion,
22633        __input: &[u8],
22634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22635        let avail_len = __input.len();
22636        let mut payload_buf = [0; Self::ENCODED_LEN];
22637        let mut buf = if avail_len < Self::ENCODED_LEN {
22638            payload_buf[0..avail_len].copy_from_slice(__input);
22639            Bytes::new(&payload_buf)
22640        } else {
22641            Bytes::new(__input)
22642        };
22643        let mut __struct = Self::default();
22644        __struct.operator_latitude = buf.get_i32_le();
22645        __struct.operator_longitude = buf.get_i32_le();
22646        __struct.operator_altitude_geo = buf.get_f32_le();
22647        __struct.timestamp = buf.get_u32_le();
22648        __struct.target_system = buf.get_u8();
22649        __struct.target_component = buf.get_u8();
22650        Ok(__struct)
22651    }
22652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22653        let mut __tmp = BytesMut::new(bytes);
22654        #[allow(clippy::absurd_extreme_comparisons)]
22655        #[allow(unused_comparisons)]
22656        if __tmp.remaining() < Self::ENCODED_LEN {
22657            panic!(
22658                "buffer is too small (need {} bytes, but got {})",
22659                Self::ENCODED_LEN,
22660                __tmp.remaining(),
22661            )
22662        }
22663        __tmp.put_i32_le(self.operator_latitude);
22664        __tmp.put_i32_le(self.operator_longitude);
22665        __tmp.put_f32_le(self.operator_altitude_geo);
22666        __tmp.put_u32_le(self.timestamp);
22667        __tmp.put_u8(self.target_system);
22668        __tmp.put_u8(self.target_component);
22669        if matches!(version, MavlinkVersion::V2) {
22670            let len = __tmp.len();
22671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22672        } else {
22673            __tmp.len()
22674        }
22675    }
22676}
22677#[doc = "id: 100"]
22678#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22679#[derive(Debug, Clone, PartialEq)]
22680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22682pub struct OPTICAL_FLOW_DATA {
22683    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22684    pub time_usec: u64,
22685    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22686    pub flow_comp_m_x: f32,
22687    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22688    pub flow_comp_m_y: f32,
22689    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22690    pub ground_distance: f32,
22691    #[doc = "Flow in x-sensor direction"]
22692    pub flow_x: i16,
22693    #[doc = "Flow in y-sensor direction"]
22694    pub flow_y: i16,
22695    #[doc = "Sensor ID"]
22696    pub sensor_id: u8,
22697    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22698    pub quality: u8,
22699    #[doc = "Flow rate about X axis"]
22700    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22701    pub flow_rate_x: f32,
22702    #[doc = "Flow rate about Y axis"]
22703    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22704    pub flow_rate_y: f32,
22705}
22706impl OPTICAL_FLOW_DATA {
22707    pub const ENCODED_LEN: usize = 34usize;
22708    pub const DEFAULT: Self = Self {
22709        time_usec: 0_u64,
22710        flow_comp_m_x: 0.0_f32,
22711        flow_comp_m_y: 0.0_f32,
22712        ground_distance: 0.0_f32,
22713        flow_x: 0_i16,
22714        flow_y: 0_i16,
22715        sensor_id: 0_u8,
22716        quality: 0_u8,
22717        flow_rate_x: 0.0_f32,
22718        flow_rate_y: 0.0_f32,
22719    };
22720    #[cfg(feature = "arbitrary")]
22721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22722        use arbitrary::{Arbitrary, Unstructured};
22723        let mut buf = [0u8; 1024];
22724        rng.fill_bytes(&mut buf);
22725        let mut unstructured = Unstructured::new(&buf);
22726        Self::arbitrary(&mut unstructured).unwrap_or_default()
22727    }
22728}
22729impl Default for OPTICAL_FLOW_DATA {
22730    fn default() -> Self {
22731        Self::DEFAULT.clone()
22732    }
22733}
22734impl MessageData for OPTICAL_FLOW_DATA {
22735    type Message = MavMessage;
22736    const ID: u32 = 100u32;
22737    const NAME: &'static str = "OPTICAL_FLOW";
22738    const EXTRA_CRC: u8 = 175u8;
22739    const ENCODED_LEN: usize = 34usize;
22740    fn deser(
22741        _version: MavlinkVersion,
22742        __input: &[u8],
22743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22744        let avail_len = __input.len();
22745        let mut payload_buf = [0; Self::ENCODED_LEN];
22746        let mut buf = if avail_len < Self::ENCODED_LEN {
22747            payload_buf[0..avail_len].copy_from_slice(__input);
22748            Bytes::new(&payload_buf)
22749        } else {
22750            Bytes::new(__input)
22751        };
22752        let mut __struct = Self::default();
22753        __struct.time_usec = buf.get_u64_le();
22754        __struct.flow_comp_m_x = buf.get_f32_le();
22755        __struct.flow_comp_m_y = buf.get_f32_le();
22756        __struct.ground_distance = buf.get_f32_le();
22757        __struct.flow_x = buf.get_i16_le();
22758        __struct.flow_y = buf.get_i16_le();
22759        __struct.sensor_id = buf.get_u8();
22760        __struct.quality = buf.get_u8();
22761        __struct.flow_rate_x = buf.get_f32_le();
22762        __struct.flow_rate_y = buf.get_f32_le();
22763        Ok(__struct)
22764    }
22765    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22766        let mut __tmp = BytesMut::new(bytes);
22767        #[allow(clippy::absurd_extreme_comparisons)]
22768        #[allow(unused_comparisons)]
22769        if __tmp.remaining() < Self::ENCODED_LEN {
22770            panic!(
22771                "buffer is too small (need {} bytes, but got {})",
22772                Self::ENCODED_LEN,
22773                __tmp.remaining(),
22774            )
22775        }
22776        __tmp.put_u64_le(self.time_usec);
22777        __tmp.put_f32_le(self.flow_comp_m_x);
22778        __tmp.put_f32_le(self.flow_comp_m_y);
22779        __tmp.put_f32_le(self.ground_distance);
22780        __tmp.put_i16_le(self.flow_x);
22781        __tmp.put_i16_le(self.flow_y);
22782        __tmp.put_u8(self.sensor_id);
22783        __tmp.put_u8(self.quality);
22784        __tmp.put_f32_le(self.flow_rate_x);
22785        __tmp.put_f32_le(self.flow_rate_y);
22786        if matches!(version, MavlinkVersion::V2) {
22787            let len = __tmp.len();
22788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22789        } else {
22790            __tmp.len()
22791        }
22792    }
22793}
22794#[doc = "id: 106"]
22795#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22796#[derive(Debug, Clone, PartialEq)]
22797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22799pub struct OPTICAL_FLOW_RAD_DATA {
22800    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22801    pub time_usec: u64,
22802    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22803    pub integration_time_us: u32,
22804    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22805    pub integrated_x: f32,
22806    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22807    pub integrated_y: f32,
22808    #[doc = "RH rotation around X axis"]
22809    pub integrated_xgyro: f32,
22810    #[doc = "RH rotation around Y axis"]
22811    pub integrated_ygyro: f32,
22812    #[doc = "RH rotation around Z axis"]
22813    pub integrated_zgyro: f32,
22814    #[doc = "Time since the distance was sampled."]
22815    pub time_delta_distance_us: u32,
22816    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22817    pub distance: f32,
22818    #[doc = "Temperature"]
22819    pub temperature: i16,
22820    #[doc = "Sensor ID"]
22821    pub sensor_id: u8,
22822    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22823    pub quality: u8,
22824}
22825impl OPTICAL_FLOW_RAD_DATA {
22826    pub const ENCODED_LEN: usize = 44usize;
22827    pub const DEFAULT: Self = Self {
22828        time_usec: 0_u64,
22829        integration_time_us: 0_u32,
22830        integrated_x: 0.0_f32,
22831        integrated_y: 0.0_f32,
22832        integrated_xgyro: 0.0_f32,
22833        integrated_ygyro: 0.0_f32,
22834        integrated_zgyro: 0.0_f32,
22835        time_delta_distance_us: 0_u32,
22836        distance: 0.0_f32,
22837        temperature: 0_i16,
22838        sensor_id: 0_u8,
22839        quality: 0_u8,
22840    };
22841    #[cfg(feature = "arbitrary")]
22842    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22843        use arbitrary::{Arbitrary, Unstructured};
22844        let mut buf = [0u8; 1024];
22845        rng.fill_bytes(&mut buf);
22846        let mut unstructured = Unstructured::new(&buf);
22847        Self::arbitrary(&mut unstructured).unwrap_or_default()
22848    }
22849}
22850impl Default for OPTICAL_FLOW_RAD_DATA {
22851    fn default() -> Self {
22852        Self::DEFAULT.clone()
22853    }
22854}
22855impl MessageData for OPTICAL_FLOW_RAD_DATA {
22856    type Message = MavMessage;
22857    const ID: u32 = 106u32;
22858    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22859    const EXTRA_CRC: u8 = 138u8;
22860    const ENCODED_LEN: usize = 44usize;
22861    fn deser(
22862        _version: MavlinkVersion,
22863        __input: &[u8],
22864    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22865        let avail_len = __input.len();
22866        let mut payload_buf = [0; Self::ENCODED_LEN];
22867        let mut buf = if avail_len < Self::ENCODED_LEN {
22868            payload_buf[0..avail_len].copy_from_slice(__input);
22869            Bytes::new(&payload_buf)
22870        } else {
22871            Bytes::new(__input)
22872        };
22873        let mut __struct = Self::default();
22874        __struct.time_usec = buf.get_u64_le();
22875        __struct.integration_time_us = buf.get_u32_le();
22876        __struct.integrated_x = buf.get_f32_le();
22877        __struct.integrated_y = buf.get_f32_le();
22878        __struct.integrated_xgyro = buf.get_f32_le();
22879        __struct.integrated_ygyro = buf.get_f32_le();
22880        __struct.integrated_zgyro = buf.get_f32_le();
22881        __struct.time_delta_distance_us = buf.get_u32_le();
22882        __struct.distance = buf.get_f32_le();
22883        __struct.temperature = buf.get_i16_le();
22884        __struct.sensor_id = buf.get_u8();
22885        __struct.quality = buf.get_u8();
22886        Ok(__struct)
22887    }
22888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22889        let mut __tmp = BytesMut::new(bytes);
22890        #[allow(clippy::absurd_extreme_comparisons)]
22891        #[allow(unused_comparisons)]
22892        if __tmp.remaining() < Self::ENCODED_LEN {
22893            panic!(
22894                "buffer is too small (need {} bytes, but got {})",
22895                Self::ENCODED_LEN,
22896                __tmp.remaining(),
22897            )
22898        }
22899        __tmp.put_u64_le(self.time_usec);
22900        __tmp.put_u32_le(self.integration_time_us);
22901        __tmp.put_f32_le(self.integrated_x);
22902        __tmp.put_f32_le(self.integrated_y);
22903        __tmp.put_f32_le(self.integrated_xgyro);
22904        __tmp.put_f32_le(self.integrated_ygyro);
22905        __tmp.put_f32_le(self.integrated_zgyro);
22906        __tmp.put_u32_le(self.time_delta_distance_us);
22907        __tmp.put_f32_le(self.distance);
22908        __tmp.put_i16_le(self.temperature);
22909        __tmp.put_u8(self.sensor_id);
22910        __tmp.put_u8(self.quality);
22911        if matches!(version, MavlinkVersion::V2) {
22912            let len = __tmp.len();
22913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22914        } else {
22915            __tmp.len()
22916        }
22917    }
22918}
22919#[doc = "id: 360"]
22920#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22921#[derive(Debug, Clone, PartialEq)]
22922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22924pub struct ORBIT_EXECUTION_STATUS_DATA {
22925    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22926    pub time_usec: u64,
22927    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22928    pub radius: f32,
22929    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22930    pub x: i32,
22931    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22932    pub y: i32,
22933    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22934    pub z: f32,
22935    #[doc = "The coordinate system of the fields: x, y, z."]
22936    pub frame: MavFrame,
22937}
22938impl ORBIT_EXECUTION_STATUS_DATA {
22939    pub const ENCODED_LEN: usize = 25usize;
22940    pub const DEFAULT: Self = Self {
22941        time_usec: 0_u64,
22942        radius: 0.0_f32,
22943        x: 0_i32,
22944        y: 0_i32,
22945        z: 0.0_f32,
22946        frame: MavFrame::DEFAULT,
22947    };
22948    #[cfg(feature = "arbitrary")]
22949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22950        use arbitrary::{Arbitrary, Unstructured};
22951        let mut buf = [0u8; 1024];
22952        rng.fill_bytes(&mut buf);
22953        let mut unstructured = Unstructured::new(&buf);
22954        Self::arbitrary(&mut unstructured).unwrap_or_default()
22955    }
22956}
22957impl Default for ORBIT_EXECUTION_STATUS_DATA {
22958    fn default() -> Self {
22959        Self::DEFAULT.clone()
22960    }
22961}
22962impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22963    type Message = MavMessage;
22964    const ID: u32 = 360u32;
22965    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22966    const EXTRA_CRC: u8 = 11u8;
22967    const ENCODED_LEN: usize = 25usize;
22968    fn deser(
22969        _version: MavlinkVersion,
22970        __input: &[u8],
22971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22972        let avail_len = __input.len();
22973        let mut payload_buf = [0; Self::ENCODED_LEN];
22974        let mut buf = if avail_len < Self::ENCODED_LEN {
22975            payload_buf[0..avail_len].copy_from_slice(__input);
22976            Bytes::new(&payload_buf)
22977        } else {
22978            Bytes::new(__input)
22979        };
22980        let mut __struct = Self::default();
22981        __struct.time_usec = buf.get_u64_le();
22982        __struct.radius = buf.get_f32_le();
22983        __struct.x = buf.get_i32_le();
22984        __struct.y = buf.get_i32_le();
22985        __struct.z = buf.get_f32_le();
22986        let tmp = buf.get_u8();
22987        __struct.frame =
22988            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22989                enum_type: "MavFrame",
22990                value: tmp as u32,
22991            })?;
22992        Ok(__struct)
22993    }
22994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22995        let mut __tmp = BytesMut::new(bytes);
22996        #[allow(clippy::absurd_extreme_comparisons)]
22997        #[allow(unused_comparisons)]
22998        if __tmp.remaining() < Self::ENCODED_LEN {
22999            panic!(
23000                "buffer is too small (need {} bytes, but got {})",
23001                Self::ENCODED_LEN,
23002                __tmp.remaining(),
23003            )
23004        }
23005        __tmp.put_u64_le(self.time_usec);
23006        __tmp.put_f32_le(self.radius);
23007        __tmp.put_i32_le(self.x);
23008        __tmp.put_i32_le(self.y);
23009        __tmp.put_f32_le(self.z);
23010        __tmp.put_u8(self.frame as u8);
23011        if matches!(version, MavlinkVersion::V2) {
23012            let len = __tmp.len();
23013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23014        } else {
23015            __tmp.len()
23016        }
23017    }
23018}
23019#[doc = "id: 324"]
23020#[doc = "Response from a PARAM_EXT_SET message."]
23021#[derive(Debug, Clone, PartialEq)]
23022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23024pub struct PARAM_EXT_ACK_DATA {
23025    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23026    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23027    pub param_id: [u8; 16],
23028    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23029    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23030    pub param_value: [u8; 128],
23031    #[doc = "Parameter type."]
23032    pub param_type: MavParamExtType,
23033    #[doc = "Result code."]
23034    pub param_result: ParamAck,
23035}
23036impl PARAM_EXT_ACK_DATA {
23037    pub const ENCODED_LEN: usize = 146usize;
23038    pub const DEFAULT: Self = Self {
23039        param_id: [0_u8; 16usize],
23040        param_value: [0_u8; 128usize],
23041        param_type: MavParamExtType::DEFAULT,
23042        param_result: ParamAck::DEFAULT,
23043    };
23044    #[cfg(feature = "arbitrary")]
23045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23046        use arbitrary::{Arbitrary, Unstructured};
23047        let mut buf = [0u8; 1024];
23048        rng.fill_bytes(&mut buf);
23049        let mut unstructured = Unstructured::new(&buf);
23050        Self::arbitrary(&mut unstructured).unwrap_or_default()
23051    }
23052}
23053impl Default for PARAM_EXT_ACK_DATA {
23054    fn default() -> Self {
23055        Self::DEFAULT.clone()
23056    }
23057}
23058impl MessageData for PARAM_EXT_ACK_DATA {
23059    type Message = MavMessage;
23060    const ID: u32 = 324u32;
23061    const NAME: &'static str = "PARAM_EXT_ACK";
23062    const EXTRA_CRC: u8 = 132u8;
23063    const ENCODED_LEN: usize = 146usize;
23064    fn deser(
23065        _version: MavlinkVersion,
23066        __input: &[u8],
23067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23068        let avail_len = __input.len();
23069        let mut payload_buf = [0; Self::ENCODED_LEN];
23070        let mut buf = if avail_len < Self::ENCODED_LEN {
23071            payload_buf[0..avail_len].copy_from_slice(__input);
23072            Bytes::new(&payload_buf)
23073        } else {
23074            Bytes::new(__input)
23075        };
23076        let mut __struct = Self::default();
23077        for v in &mut __struct.param_id {
23078            let val = buf.get_u8();
23079            *v = val;
23080        }
23081        for v in &mut __struct.param_value {
23082            let val = buf.get_u8();
23083            *v = val;
23084        }
23085        let tmp = buf.get_u8();
23086        __struct.param_type =
23087            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23088                enum_type: "MavParamExtType",
23089                value: tmp as u32,
23090            })?;
23091        let tmp = buf.get_u8();
23092        __struct.param_result =
23093            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23094                enum_type: "ParamAck",
23095                value: tmp as u32,
23096            })?;
23097        Ok(__struct)
23098    }
23099    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23100        let mut __tmp = BytesMut::new(bytes);
23101        #[allow(clippy::absurd_extreme_comparisons)]
23102        #[allow(unused_comparisons)]
23103        if __tmp.remaining() < Self::ENCODED_LEN {
23104            panic!(
23105                "buffer is too small (need {} bytes, but got {})",
23106                Self::ENCODED_LEN,
23107                __tmp.remaining(),
23108            )
23109        }
23110        for val in &self.param_id {
23111            __tmp.put_u8(*val);
23112        }
23113        for val in &self.param_value {
23114            __tmp.put_u8(*val);
23115        }
23116        __tmp.put_u8(self.param_type as u8);
23117        __tmp.put_u8(self.param_result as u8);
23118        if matches!(version, MavlinkVersion::V2) {
23119            let len = __tmp.len();
23120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23121        } else {
23122            __tmp.len()
23123        }
23124    }
23125}
23126#[doc = "id: 321"]
23127#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23128#[derive(Debug, Clone, PartialEq)]
23129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23131pub struct PARAM_EXT_REQUEST_LIST_DATA {
23132    #[doc = "System ID"]
23133    pub target_system: u8,
23134    #[doc = "Component ID"]
23135    pub target_component: u8,
23136}
23137impl PARAM_EXT_REQUEST_LIST_DATA {
23138    pub const ENCODED_LEN: usize = 2usize;
23139    pub const DEFAULT: Self = Self {
23140        target_system: 0_u8,
23141        target_component: 0_u8,
23142    };
23143    #[cfg(feature = "arbitrary")]
23144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23145        use arbitrary::{Arbitrary, Unstructured};
23146        let mut buf = [0u8; 1024];
23147        rng.fill_bytes(&mut buf);
23148        let mut unstructured = Unstructured::new(&buf);
23149        Self::arbitrary(&mut unstructured).unwrap_or_default()
23150    }
23151}
23152impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23153    fn default() -> Self {
23154        Self::DEFAULT.clone()
23155    }
23156}
23157impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23158    type Message = MavMessage;
23159    const ID: u32 = 321u32;
23160    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23161    const EXTRA_CRC: u8 = 88u8;
23162    const ENCODED_LEN: usize = 2usize;
23163    fn deser(
23164        _version: MavlinkVersion,
23165        __input: &[u8],
23166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23167        let avail_len = __input.len();
23168        let mut payload_buf = [0; Self::ENCODED_LEN];
23169        let mut buf = if avail_len < Self::ENCODED_LEN {
23170            payload_buf[0..avail_len].copy_from_slice(__input);
23171            Bytes::new(&payload_buf)
23172        } else {
23173            Bytes::new(__input)
23174        };
23175        let mut __struct = Self::default();
23176        __struct.target_system = buf.get_u8();
23177        __struct.target_component = buf.get_u8();
23178        Ok(__struct)
23179    }
23180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23181        let mut __tmp = BytesMut::new(bytes);
23182        #[allow(clippy::absurd_extreme_comparisons)]
23183        #[allow(unused_comparisons)]
23184        if __tmp.remaining() < Self::ENCODED_LEN {
23185            panic!(
23186                "buffer is too small (need {} bytes, but got {})",
23187                Self::ENCODED_LEN,
23188                __tmp.remaining(),
23189            )
23190        }
23191        __tmp.put_u8(self.target_system);
23192        __tmp.put_u8(self.target_component);
23193        if matches!(version, MavlinkVersion::V2) {
23194            let len = __tmp.len();
23195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23196        } else {
23197            __tmp.len()
23198        }
23199    }
23200}
23201#[doc = "id: 320"]
23202#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23203#[derive(Debug, Clone, PartialEq)]
23204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23206pub struct PARAM_EXT_REQUEST_READ_DATA {
23207    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23208    pub param_index: i16,
23209    #[doc = "System ID"]
23210    pub target_system: u8,
23211    #[doc = "Component ID"]
23212    pub target_component: u8,
23213    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23215    pub param_id: [u8; 16],
23216}
23217impl PARAM_EXT_REQUEST_READ_DATA {
23218    pub const ENCODED_LEN: usize = 20usize;
23219    pub const DEFAULT: Self = Self {
23220        param_index: 0_i16,
23221        target_system: 0_u8,
23222        target_component: 0_u8,
23223        param_id: [0_u8; 16usize],
23224    };
23225    #[cfg(feature = "arbitrary")]
23226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23227        use arbitrary::{Arbitrary, Unstructured};
23228        let mut buf = [0u8; 1024];
23229        rng.fill_bytes(&mut buf);
23230        let mut unstructured = Unstructured::new(&buf);
23231        Self::arbitrary(&mut unstructured).unwrap_or_default()
23232    }
23233}
23234impl Default for PARAM_EXT_REQUEST_READ_DATA {
23235    fn default() -> Self {
23236        Self::DEFAULT.clone()
23237    }
23238}
23239impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23240    type Message = MavMessage;
23241    const ID: u32 = 320u32;
23242    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23243    const EXTRA_CRC: u8 = 243u8;
23244    const ENCODED_LEN: usize = 20usize;
23245    fn deser(
23246        _version: MavlinkVersion,
23247        __input: &[u8],
23248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23249        let avail_len = __input.len();
23250        let mut payload_buf = [0; Self::ENCODED_LEN];
23251        let mut buf = if avail_len < Self::ENCODED_LEN {
23252            payload_buf[0..avail_len].copy_from_slice(__input);
23253            Bytes::new(&payload_buf)
23254        } else {
23255            Bytes::new(__input)
23256        };
23257        let mut __struct = Self::default();
23258        __struct.param_index = buf.get_i16_le();
23259        __struct.target_system = buf.get_u8();
23260        __struct.target_component = buf.get_u8();
23261        for v in &mut __struct.param_id {
23262            let val = buf.get_u8();
23263            *v = val;
23264        }
23265        Ok(__struct)
23266    }
23267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23268        let mut __tmp = BytesMut::new(bytes);
23269        #[allow(clippy::absurd_extreme_comparisons)]
23270        #[allow(unused_comparisons)]
23271        if __tmp.remaining() < Self::ENCODED_LEN {
23272            panic!(
23273                "buffer is too small (need {} bytes, but got {})",
23274                Self::ENCODED_LEN,
23275                __tmp.remaining(),
23276            )
23277        }
23278        __tmp.put_i16_le(self.param_index);
23279        __tmp.put_u8(self.target_system);
23280        __tmp.put_u8(self.target_component);
23281        for val in &self.param_id {
23282            __tmp.put_u8(*val);
23283        }
23284        if matches!(version, MavlinkVersion::V2) {
23285            let len = __tmp.len();
23286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23287        } else {
23288            __tmp.len()
23289        }
23290    }
23291}
23292#[doc = "id: 323"]
23293#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23294#[derive(Debug, Clone, PartialEq)]
23295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23297pub struct PARAM_EXT_SET_DATA {
23298    #[doc = "System ID"]
23299    pub target_system: u8,
23300    #[doc = "Component ID"]
23301    pub target_component: u8,
23302    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23303    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23304    pub param_id: [u8; 16],
23305    #[doc = "Parameter value"]
23306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23307    pub param_value: [u8; 128],
23308    #[doc = "Parameter type."]
23309    pub param_type: MavParamExtType,
23310}
23311impl PARAM_EXT_SET_DATA {
23312    pub const ENCODED_LEN: usize = 147usize;
23313    pub const DEFAULT: Self = Self {
23314        target_system: 0_u8,
23315        target_component: 0_u8,
23316        param_id: [0_u8; 16usize],
23317        param_value: [0_u8; 128usize],
23318        param_type: MavParamExtType::DEFAULT,
23319    };
23320    #[cfg(feature = "arbitrary")]
23321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23322        use arbitrary::{Arbitrary, Unstructured};
23323        let mut buf = [0u8; 1024];
23324        rng.fill_bytes(&mut buf);
23325        let mut unstructured = Unstructured::new(&buf);
23326        Self::arbitrary(&mut unstructured).unwrap_or_default()
23327    }
23328}
23329impl Default for PARAM_EXT_SET_DATA {
23330    fn default() -> Self {
23331        Self::DEFAULT.clone()
23332    }
23333}
23334impl MessageData for PARAM_EXT_SET_DATA {
23335    type Message = MavMessage;
23336    const ID: u32 = 323u32;
23337    const NAME: &'static str = "PARAM_EXT_SET";
23338    const EXTRA_CRC: u8 = 78u8;
23339    const ENCODED_LEN: usize = 147usize;
23340    fn deser(
23341        _version: MavlinkVersion,
23342        __input: &[u8],
23343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23344        let avail_len = __input.len();
23345        let mut payload_buf = [0; Self::ENCODED_LEN];
23346        let mut buf = if avail_len < Self::ENCODED_LEN {
23347            payload_buf[0..avail_len].copy_from_slice(__input);
23348            Bytes::new(&payload_buf)
23349        } else {
23350            Bytes::new(__input)
23351        };
23352        let mut __struct = Self::default();
23353        __struct.target_system = buf.get_u8();
23354        __struct.target_component = buf.get_u8();
23355        for v in &mut __struct.param_id {
23356            let val = buf.get_u8();
23357            *v = val;
23358        }
23359        for v in &mut __struct.param_value {
23360            let val = buf.get_u8();
23361            *v = val;
23362        }
23363        let tmp = buf.get_u8();
23364        __struct.param_type =
23365            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23366                enum_type: "MavParamExtType",
23367                value: tmp as u32,
23368            })?;
23369        Ok(__struct)
23370    }
23371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23372        let mut __tmp = BytesMut::new(bytes);
23373        #[allow(clippy::absurd_extreme_comparisons)]
23374        #[allow(unused_comparisons)]
23375        if __tmp.remaining() < Self::ENCODED_LEN {
23376            panic!(
23377                "buffer is too small (need {} bytes, but got {})",
23378                Self::ENCODED_LEN,
23379                __tmp.remaining(),
23380            )
23381        }
23382        __tmp.put_u8(self.target_system);
23383        __tmp.put_u8(self.target_component);
23384        for val in &self.param_id {
23385            __tmp.put_u8(*val);
23386        }
23387        for val in &self.param_value {
23388            __tmp.put_u8(*val);
23389        }
23390        __tmp.put_u8(self.param_type as u8);
23391        if matches!(version, MavlinkVersion::V2) {
23392            let len = __tmp.len();
23393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23394        } else {
23395            __tmp.len()
23396        }
23397    }
23398}
23399#[doc = "id: 322"]
23400#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23401#[derive(Debug, Clone, PartialEq)]
23402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23404pub struct PARAM_EXT_VALUE_DATA {
23405    #[doc = "Total number of parameters"]
23406    pub param_count: u16,
23407    #[doc = "Index of this parameter"]
23408    pub param_index: u16,
23409    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23410    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23411    pub param_id: [u8; 16],
23412    #[doc = "Parameter value"]
23413    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23414    pub param_value: [u8; 128],
23415    #[doc = "Parameter type."]
23416    pub param_type: MavParamExtType,
23417}
23418impl PARAM_EXT_VALUE_DATA {
23419    pub const ENCODED_LEN: usize = 149usize;
23420    pub const DEFAULT: Self = Self {
23421        param_count: 0_u16,
23422        param_index: 0_u16,
23423        param_id: [0_u8; 16usize],
23424        param_value: [0_u8; 128usize],
23425        param_type: MavParamExtType::DEFAULT,
23426    };
23427    #[cfg(feature = "arbitrary")]
23428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23429        use arbitrary::{Arbitrary, Unstructured};
23430        let mut buf = [0u8; 1024];
23431        rng.fill_bytes(&mut buf);
23432        let mut unstructured = Unstructured::new(&buf);
23433        Self::arbitrary(&mut unstructured).unwrap_or_default()
23434    }
23435}
23436impl Default for PARAM_EXT_VALUE_DATA {
23437    fn default() -> Self {
23438        Self::DEFAULT.clone()
23439    }
23440}
23441impl MessageData for PARAM_EXT_VALUE_DATA {
23442    type Message = MavMessage;
23443    const ID: u32 = 322u32;
23444    const NAME: &'static str = "PARAM_EXT_VALUE";
23445    const EXTRA_CRC: u8 = 243u8;
23446    const ENCODED_LEN: usize = 149usize;
23447    fn deser(
23448        _version: MavlinkVersion,
23449        __input: &[u8],
23450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23451        let avail_len = __input.len();
23452        let mut payload_buf = [0; Self::ENCODED_LEN];
23453        let mut buf = if avail_len < Self::ENCODED_LEN {
23454            payload_buf[0..avail_len].copy_from_slice(__input);
23455            Bytes::new(&payload_buf)
23456        } else {
23457            Bytes::new(__input)
23458        };
23459        let mut __struct = Self::default();
23460        __struct.param_count = buf.get_u16_le();
23461        __struct.param_index = buf.get_u16_le();
23462        for v in &mut __struct.param_id {
23463            let val = buf.get_u8();
23464            *v = val;
23465        }
23466        for v in &mut __struct.param_value {
23467            let val = buf.get_u8();
23468            *v = val;
23469        }
23470        let tmp = buf.get_u8();
23471        __struct.param_type =
23472            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23473                enum_type: "MavParamExtType",
23474                value: tmp as u32,
23475            })?;
23476        Ok(__struct)
23477    }
23478    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23479        let mut __tmp = BytesMut::new(bytes);
23480        #[allow(clippy::absurd_extreme_comparisons)]
23481        #[allow(unused_comparisons)]
23482        if __tmp.remaining() < Self::ENCODED_LEN {
23483            panic!(
23484                "buffer is too small (need {} bytes, but got {})",
23485                Self::ENCODED_LEN,
23486                __tmp.remaining(),
23487            )
23488        }
23489        __tmp.put_u16_le(self.param_count);
23490        __tmp.put_u16_le(self.param_index);
23491        for val in &self.param_id {
23492            __tmp.put_u8(*val);
23493        }
23494        for val in &self.param_value {
23495            __tmp.put_u8(*val);
23496        }
23497        __tmp.put_u8(self.param_type as u8);
23498        if matches!(version, MavlinkVersion::V2) {
23499            let len = __tmp.len();
23500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23501        } else {
23502            __tmp.len()
23503        }
23504    }
23505}
23506#[doc = "id: 50"]
23507#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23508#[derive(Debug, Clone, PartialEq)]
23509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23511pub struct PARAM_MAP_RC_DATA {
23512    #[doc = "Initial parameter value"]
23513    pub param_value0: f32,
23514    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23515    pub scale: f32,
23516    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23517    pub param_value_min: f32,
23518    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23519    pub param_value_max: f32,
23520    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23521    pub param_index: i16,
23522    #[doc = "System ID"]
23523    pub target_system: u8,
23524    #[doc = "Component ID"]
23525    pub target_component: u8,
23526    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23528    pub param_id: [u8; 16],
23529    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23530    pub parameter_rc_channel_index: u8,
23531}
23532impl PARAM_MAP_RC_DATA {
23533    pub const ENCODED_LEN: usize = 37usize;
23534    pub const DEFAULT: Self = Self {
23535        param_value0: 0.0_f32,
23536        scale: 0.0_f32,
23537        param_value_min: 0.0_f32,
23538        param_value_max: 0.0_f32,
23539        param_index: 0_i16,
23540        target_system: 0_u8,
23541        target_component: 0_u8,
23542        param_id: [0_u8; 16usize],
23543        parameter_rc_channel_index: 0_u8,
23544    };
23545    #[cfg(feature = "arbitrary")]
23546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23547        use arbitrary::{Arbitrary, Unstructured};
23548        let mut buf = [0u8; 1024];
23549        rng.fill_bytes(&mut buf);
23550        let mut unstructured = Unstructured::new(&buf);
23551        Self::arbitrary(&mut unstructured).unwrap_or_default()
23552    }
23553}
23554impl Default for PARAM_MAP_RC_DATA {
23555    fn default() -> Self {
23556        Self::DEFAULT.clone()
23557    }
23558}
23559impl MessageData for PARAM_MAP_RC_DATA {
23560    type Message = MavMessage;
23561    const ID: u32 = 50u32;
23562    const NAME: &'static str = "PARAM_MAP_RC";
23563    const EXTRA_CRC: u8 = 78u8;
23564    const ENCODED_LEN: usize = 37usize;
23565    fn deser(
23566        _version: MavlinkVersion,
23567        __input: &[u8],
23568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23569        let avail_len = __input.len();
23570        let mut payload_buf = [0; Self::ENCODED_LEN];
23571        let mut buf = if avail_len < Self::ENCODED_LEN {
23572            payload_buf[0..avail_len].copy_from_slice(__input);
23573            Bytes::new(&payload_buf)
23574        } else {
23575            Bytes::new(__input)
23576        };
23577        let mut __struct = Self::default();
23578        __struct.param_value0 = buf.get_f32_le();
23579        __struct.scale = buf.get_f32_le();
23580        __struct.param_value_min = buf.get_f32_le();
23581        __struct.param_value_max = buf.get_f32_le();
23582        __struct.param_index = buf.get_i16_le();
23583        __struct.target_system = buf.get_u8();
23584        __struct.target_component = buf.get_u8();
23585        for v in &mut __struct.param_id {
23586            let val = buf.get_u8();
23587            *v = val;
23588        }
23589        __struct.parameter_rc_channel_index = buf.get_u8();
23590        Ok(__struct)
23591    }
23592    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23593        let mut __tmp = BytesMut::new(bytes);
23594        #[allow(clippy::absurd_extreme_comparisons)]
23595        #[allow(unused_comparisons)]
23596        if __tmp.remaining() < Self::ENCODED_LEN {
23597            panic!(
23598                "buffer is too small (need {} bytes, but got {})",
23599                Self::ENCODED_LEN,
23600                __tmp.remaining(),
23601            )
23602        }
23603        __tmp.put_f32_le(self.param_value0);
23604        __tmp.put_f32_le(self.scale);
23605        __tmp.put_f32_le(self.param_value_min);
23606        __tmp.put_f32_le(self.param_value_max);
23607        __tmp.put_i16_le(self.param_index);
23608        __tmp.put_u8(self.target_system);
23609        __tmp.put_u8(self.target_component);
23610        for val in &self.param_id {
23611            __tmp.put_u8(*val);
23612        }
23613        __tmp.put_u8(self.parameter_rc_channel_index);
23614        if matches!(version, MavlinkVersion::V2) {
23615            let len = __tmp.len();
23616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23617        } else {
23618            __tmp.len()
23619        }
23620    }
23621}
23622#[doc = "id: 21"]
23623#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23624#[derive(Debug, Clone, PartialEq)]
23625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23627pub struct PARAM_REQUEST_LIST_DATA {
23628    #[doc = "System ID"]
23629    pub target_system: u8,
23630    #[doc = "Component ID"]
23631    pub target_component: u8,
23632}
23633impl PARAM_REQUEST_LIST_DATA {
23634    pub const ENCODED_LEN: usize = 2usize;
23635    pub const DEFAULT: Self = Self {
23636        target_system: 0_u8,
23637        target_component: 0_u8,
23638    };
23639    #[cfg(feature = "arbitrary")]
23640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23641        use arbitrary::{Arbitrary, Unstructured};
23642        let mut buf = [0u8; 1024];
23643        rng.fill_bytes(&mut buf);
23644        let mut unstructured = Unstructured::new(&buf);
23645        Self::arbitrary(&mut unstructured).unwrap_or_default()
23646    }
23647}
23648impl Default for PARAM_REQUEST_LIST_DATA {
23649    fn default() -> Self {
23650        Self::DEFAULT.clone()
23651    }
23652}
23653impl MessageData for PARAM_REQUEST_LIST_DATA {
23654    type Message = MavMessage;
23655    const ID: u32 = 21u32;
23656    const NAME: &'static str = "PARAM_REQUEST_LIST";
23657    const EXTRA_CRC: u8 = 159u8;
23658    const ENCODED_LEN: usize = 2usize;
23659    fn deser(
23660        _version: MavlinkVersion,
23661        __input: &[u8],
23662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23663        let avail_len = __input.len();
23664        let mut payload_buf = [0; Self::ENCODED_LEN];
23665        let mut buf = if avail_len < Self::ENCODED_LEN {
23666            payload_buf[0..avail_len].copy_from_slice(__input);
23667            Bytes::new(&payload_buf)
23668        } else {
23669            Bytes::new(__input)
23670        };
23671        let mut __struct = Self::default();
23672        __struct.target_system = buf.get_u8();
23673        __struct.target_component = buf.get_u8();
23674        Ok(__struct)
23675    }
23676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23677        let mut __tmp = BytesMut::new(bytes);
23678        #[allow(clippy::absurd_extreme_comparisons)]
23679        #[allow(unused_comparisons)]
23680        if __tmp.remaining() < Self::ENCODED_LEN {
23681            panic!(
23682                "buffer is too small (need {} bytes, but got {})",
23683                Self::ENCODED_LEN,
23684                __tmp.remaining(),
23685            )
23686        }
23687        __tmp.put_u8(self.target_system);
23688        __tmp.put_u8(self.target_component);
23689        if matches!(version, MavlinkVersion::V2) {
23690            let len = __tmp.len();
23691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23692        } else {
23693            __tmp.len()
23694        }
23695    }
23696}
23697#[doc = "id: 20"]
23698#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23699#[derive(Debug, Clone, PartialEq)]
23700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23702pub struct PARAM_REQUEST_READ_DATA {
23703    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23704    pub param_index: i16,
23705    #[doc = "System ID"]
23706    pub target_system: u8,
23707    #[doc = "Component ID"]
23708    pub target_component: u8,
23709    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23710    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23711    pub param_id: [u8; 16],
23712}
23713impl PARAM_REQUEST_READ_DATA {
23714    pub const ENCODED_LEN: usize = 20usize;
23715    pub const DEFAULT: Self = Self {
23716        param_index: 0_i16,
23717        target_system: 0_u8,
23718        target_component: 0_u8,
23719        param_id: [0_u8; 16usize],
23720    };
23721    #[cfg(feature = "arbitrary")]
23722    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23723        use arbitrary::{Arbitrary, Unstructured};
23724        let mut buf = [0u8; 1024];
23725        rng.fill_bytes(&mut buf);
23726        let mut unstructured = Unstructured::new(&buf);
23727        Self::arbitrary(&mut unstructured).unwrap_or_default()
23728    }
23729}
23730impl Default for PARAM_REQUEST_READ_DATA {
23731    fn default() -> Self {
23732        Self::DEFAULT.clone()
23733    }
23734}
23735impl MessageData for PARAM_REQUEST_READ_DATA {
23736    type Message = MavMessage;
23737    const ID: u32 = 20u32;
23738    const NAME: &'static str = "PARAM_REQUEST_READ";
23739    const EXTRA_CRC: u8 = 214u8;
23740    const ENCODED_LEN: usize = 20usize;
23741    fn deser(
23742        _version: MavlinkVersion,
23743        __input: &[u8],
23744    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23745        let avail_len = __input.len();
23746        let mut payload_buf = [0; Self::ENCODED_LEN];
23747        let mut buf = if avail_len < Self::ENCODED_LEN {
23748            payload_buf[0..avail_len].copy_from_slice(__input);
23749            Bytes::new(&payload_buf)
23750        } else {
23751            Bytes::new(__input)
23752        };
23753        let mut __struct = Self::default();
23754        __struct.param_index = buf.get_i16_le();
23755        __struct.target_system = buf.get_u8();
23756        __struct.target_component = buf.get_u8();
23757        for v in &mut __struct.param_id {
23758            let val = buf.get_u8();
23759            *v = val;
23760        }
23761        Ok(__struct)
23762    }
23763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23764        let mut __tmp = BytesMut::new(bytes);
23765        #[allow(clippy::absurd_extreme_comparisons)]
23766        #[allow(unused_comparisons)]
23767        if __tmp.remaining() < Self::ENCODED_LEN {
23768            panic!(
23769                "buffer is too small (need {} bytes, but got {})",
23770                Self::ENCODED_LEN,
23771                __tmp.remaining(),
23772            )
23773        }
23774        __tmp.put_i16_le(self.param_index);
23775        __tmp.put_u8(self.target_system);
23776        __tmp.put_u8(self.target_component);
23777        for val in &self.param_id {
23778            __tmp.put_u8(*val);
23779        }
23780        if matches!(version, MavlinkVersion::V2) {
23781            let len = __tmp.len();
23782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23783        } else {
23784            __tmp.len()
23785        }
23786    }
23787}
23788#[doc = "id: 23"]
23789#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23790#[derive(Debug, Clone, PartialEq)]
23791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23793pub struct PARAM_SET_DATA {
23794    #[doc = "Onboard parameter value"]
23795    pub param_value: f32,
23796    #[doc = "System ID"]
23797    pub target_system: u8,
23798    #[doc = "Component ID"]
23799    pub target_component: u8,
23800    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23801    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23802    pub param_id: [u8; 16],
23803    #[doc = "Onboard parameter type."]
23804    pub param_type: MavParamType,
23805}
23806impl PARAM_SET_DATA {
23807    pub const ENCODED_LEN: usize = 23usize;
23808    pub const DEFAULT: Self = Self {
23809        param_value: 0.0_f32,
23810        target_system: 0_u8,
23811        target_component: 0_u8,
23812        param_id: [0_u8; 16usize],
23813        param_type: MavParamType::DEFAULT,
23814    };
23815    #[cfg(feature = "arbitrary")]
23816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23817        use arbitrary::{Arbitrary, Unstructured};
23818        let mut buf = [0u8; 1024];
23819        rng.fill_bytes(&mut buf);
23820        let mut unstructured = Unstructured::new(&buf);
23821        Self::arbitrary(&mut unstructured).unwrap_or_default()
23822    }
23823}
23824impl Default for PARAM_SET_DATA {
23825    fn default() -> Self {
23826        Self::DEFAULT.clone()
23827    }
23828}
23829impl MessageData for PARAM_SET_DATA {
23830    type Message = MavMessage;
23831    const ID: u32 = 23u32;
23832    const NAME: &'static str = "PARAM_SET";
23833    const EXTRA_CRC: u8 = 168u8;
23834    const ENCODED_LEN: usize = 23usize;
23835    fn deser(
23836        _version: MavlinkVersion,
23837        __input: &[u8],
23838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23839        let avail_len = __input.len();
23840        let mut payload_buf = [0; Self::ENCODED_LEN];
23841        let mut buf = if avail_len < Self::ENCODED_LEN {
23842            payload_buf[0..avail_len].copy_from_slice(__input);
23843            Bytes::new(&payload_buf)
23844        } else {
23845            Bytes::new(__input)
23846        };
23847        let mut __struct = Self::default();
23848        __struct.param_value = buf.get_f32_le();
23849        __struct.target_system = buf.get_u8();
23850        __struct.target_component = buf.get_u8();
23851        for v in &mut __struct.param_id {
23852            let val = buf.get_u8();
23853            *v = val;
23854        }
23855        let tmp = buf.get_u8();
23856        __struct.param_type =
23857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23858                enum_type: "MavParamType",
23859                value: tmp as u32,
23860            })?;
23861        Ok(__struct)
23862    }
23863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23864        let mut __tmp = BytesMut::new(bytes);
23865        #[allow(clippy::absurd_extreme_comparisons)]
23866        #[allow(unused_comparisons)]
23867        if __tmp.remaining() < Self::ENCODED_LEN {
23868            panic!(
23869                "buffer is too small (need {} bytes, but got {})",
23870                Self::ENCODED_LEN,
23871                __tmp.remaining(),
23872            )
23873        }
23874        __tmp.put_f32_le(self.param_value);
23875        __tmp.put_u8(self.target_system);
23876        __tmp.put_u8(self.target_component);
23877        for val in &self.param_id {
23878            __tmp.put_u8(*val);
23879        }
23880        __tmp.put_u8(self.param_type as u8);
23881        if matches!(version, MavlinkVersion::V2) {
23882            let len = __tmp.len();
23883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23884        } else {
23885            __tmp.len()
23886        }
23887    }
23888}
23889#[doc = "id: 22"]
23890#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23891#[derive(Debug, Clone, PartialEq)]
23892#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23893#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23894pub struct PARAM_VALUE_DATA {
23895    #[doc = "Onboard parameter value"]
23896    pub param_value: f32,
23897    #[doc = "Total number of onboard parameters"]
23898    pub param_count: u16,
23899    #[doc = "Index of this onboard parameter"]
23900    pub param_index: u16,
23901    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23902    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23903    pub param_id: [u8; 16],
23904    #[doc = "Onboard parameter type."]
23905    pub param_type: MavParamType,
23906}
23907impl PARAM_VALUE_DATA {
23908    pub const ENCODED_LEN: usize = 25usize;
23909    pub const DEFAULT: Self = Self {
23910        param_value: 0.0_f32,
23911        param_count: 0_u16,
23912        param_index: 0_u16,
23913        param_id: [0_u8; 16usize],
23914        param_type: MavParamType::DEFAULT,
23915    };
23916    #[cfg(feature = "arbitrary")]
23917    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23918        use arbitrary::{Arbitrary, Unstructured};
23919        let mut buf = [0u8; 1024];
23920        rng.fill_bytes(&mut buf);
23921        let mut unstructured = Unstructured::new(&buf);
23922        Self::arbitrary(&mut unstructured).unwrap_or_default()
23923    }
23924}
23925impl Default for PARAM_VALUE_DATA {
23926    fn default() -> Self {
23927        Self::DEFAULT.clone()
23928    }
23929}
23930impl MessageData for PARAM_VALUE_DATA {
23931    type Message = MavMessage;
23932    const ID: u32 = 22u32;
23933    const NAME: &'static str = "PARAM_VALUE";
23934    const EXTRA_CRC: u8 = 220u8;
23935    const ENCODED_LEN: usize = 25usize;
23936    fn deser(
23937        _version: MavlinkVersion,
23938        __input: &[u8],
23939    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23940        let avail_len = __input.len();
23941        let mut payload_buf = [0; Self::ENCODED_LEN];
23942        let mut buf = if avail_len < Self::ENCODED_LEN {
23943            payload_buf[0..avail_len].copy_from_slice(__input);
23944            Bytes::new(&payload_buf)
23945        } else {
23946            Bytes::new(__input)
23947        };
23948        let mut __struct = Self::default();
23949        __struct.param_value = buf.get_f32_le();
23950        __struct.param_count = buf.get_u16_le();
23951        __struct.param_index = buf.get_u16_le();
23952        for v in &mut __struct.param_id {
23953            let val = buf.get_u8();
23954            *v = val;
23955        }
23956        let tmp = buf.get_u8();
23957        __struct.param_type =
23958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23959                enum_type: "MavParamType",
23960                value: tmp as u32,
23961            })?;
23962        Ok(__struct)
23963    }
23964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23965        let mut __tmp = BytesMut::new(bytes);
23966        #[allow(clippy::absurd_extreme_comparisons)]
23967        #[allow(unused_comparisons)]
23968        if __tmp.remaining() < Self::ENCODED_LEN {
23969            panic!(
23970                "buffer is too small (need {} bytes, but got {})",
23971                Self::ENCODED_LEN,
23972                __tmp.remaining(),
23973            )
23974        }
23975        __tmp.put_f32_le(self.param_value);
23976        __tmp.put_u16_le(self.param_count);
23977        __tmp.put_u16_le(self.param_index);
23978        for val in &self.param_id {
23979            __tmp.put_u8(*val);
23980        }
23981        __tmp.put_u8(self.param_type as u8);
23982        if matches!(version, MavlinkVersion::V2) {
23983            let len = __tmp.len();
23984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23985        } else {
23986            __tmp.len()
23987        }
23988    }
23989}
23990#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23991#[doc = "id: 4"]
23992#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23993#[derive(Debug, Clone, PartialEq)]
23994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23996pub struct PING_DATA {
23997    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23998    pub time_usec: u64,
23999    #[doc = "PING sequence"]
24000    pub seq: u32,
24001    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24002    pub target_system: u8,
24003    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24004    pub target_component: u8,
24005}
24006impl PING_DATA {
24007    pub const ENCODED_LEN: usize = 14usize;
24008    pub const DEFAULT: Self = Self {
24009        time_usec: 0_u64,
24010        seq: 0_u32,
24011        target_system: 0_u8,
24012        target_component: 0_u8,
24013    };
24014    #[cfg(feature = "arbitrary")]
24015    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24016        use arbitrary::{Arbitrary, Unstructured};
24017        let mut buf = [0u8; 1024];
24018        rng.fill_bytes(&mut buf);
24019        let mut unstructured = Unstructured::new(&buf);
24020        Self::arbitrary(&mut unstructured).unwrap_or_default()
24021    }
24022}
24023impl Default for PING_DATA {
24024    fn default() -> Self {
24025        Self::DEFAULT.clone()
24026    }
24027}
24028impl MessageData for PING_DATA {
24029    type Message = MavMessage;
24030    const ID: u32 = 4u32;
24031    const NAME: &'static str = "PING";
24032    const EXTRA_CRC: u8 = 237u8;
24033    const ENCODED_LEN: usize = 14usize;
24034    fn deser(
24035        _version: MavlinkVersion,
24036        __input: &[u8],
24037    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24038        let avail_len = __input.len();
24039        let mut payload_buf = [0; Self::ENCODED_LEN];
24040        let mut buf = if avail_len < Self::ENCODED_LEN {
24041            payload_buf[0..avail_len].copy_from_slice(__input);
24042            Bytes::new(&payload_buf)
24043        } else {
24044            Bytes::new(__input)
24045        };
24046        let mut __struct = Self::default();
24047        __struct.time_usec = buf.get_u64_le();
24048        __struct.seq = buf.get_u32_le();
24049        __struct.target_system = buf.get_u8();
24050        __struct.target_component = buf.get_u8();
24051        Ok(__struct)
24052    }
24053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24054        let mut __tmp = BytesMut::new(bytes);
24055        #[allow(clippy::absurd_extreme_comparisons)]
24056        #[allow(unused_comparisons)]
24057        if __tmp.remaining() < Self::ENCODED_LEN {
24058            panic!(
24059                "buffer is too small (need {} bytes, but got {})",
24060                Self::ENCODED_LEN,
24061                __tmp.remaining(),
24062            )
24063        }
24064        __tmp.put_u64_le(self.time_usec);
24065        __tmp.put_u32_le(self.seq);
24066        __tmp.put_u8(self.target_system);
24067        __tmp.put_u8(self.target_component);
24068        if matches!(version, MavlinkVersion::V2) {
24069            let len = __tmp.len();
24070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24071        } else {
24072            __tmp.len()
24073        }
24074    }
24075}
24076#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24077#[doc = "id: 258"]
24078#[doc = "Control vehicle tone generation (buzzer)."]
24079#[derive(Debug, Clone, PartialEq)]
24080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24082pub struct PLAY_TUNE_DATA {
24083    #[doc = "System ID"]
24084    pub target_system: u8,
24085    #[doc = "Component ID"]
24086    pub target_component: u8,
24087    #[doc = "tune in board specific format"]
24088    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24089    pub tune: [u8; 30],
24090    #[doc = "tune extension (appended to tune)"]
24091    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24092    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24093    pub tune2: [u8; 200],
24094}
24095impl PLAY_TUNE_DATA {
24096    pub const ENCODED_LEN: usize = 232usize;
24097    pub const DEFAULT: Self = Self {
24098        target_system: 0_u8,
24099        target_component: 0_u8,
24100        tune: [0_u8; 30usize],
24101        tune2: [0_u8; 200usize],
24102    };
24103    #[cfg(feature = "arbitrary")]
24104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24105        use arbitrary::{Arbitrary, Unstructured};
24106        let mut buf = [0u8; 1024];
24107        rng.fill_bytes(&mut buf);
24108        let mut unstructured = Unstructured::new(&buf);
24109        Self::arbitrary(&mut unstructured).unwrap_or_default()
24110    }
24111}
24112impl Default for PLAY_TUNE_DATA {
24113    fn default() -> Self {
24114        Self::DEFAULT.clone()
24115    }
24116}
24117impl MessageData for PLAY_TUNE_DATA {
24118    type Message = MavMessage;
24119    const ID: u32 = 258u32;
24120    const NAME: &'static str = "PLAY_TUNE";
24121    const EXTRA_CRC: u8 = 187u8;
24122    const ENCODED_LEN: usize = 232usize;
24123    fn deser(
24124        _version: MavlinkVersion,
24125        __input: &[u8],
24126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24127        let avail_len = __input.len();
24128        let mut payload_buf = [0; Self::ENCODED_LEN];
24129        let mut buf = if avail_len < Self::ENCODED_LEN {
24130            payload_buf[0..avail_len].copy_from_slice(__input);
24131            Bytes::new(&payload_buf)
24132        } else {
24133            Bytes::new(__input)
24134        };
24135        let mut __struct = Self::default();
24136        __struct.target_system = buf.get_u8();
24137        __struct.target_component = buf.get_u8();
24138        for v in &mut __struct.tune {
24139            let val = buf.get_u8();
24140            *v = val;
24141        }
24142        for v in &mut __struct.tune2 {
24143            let val = buf.get_u8();
24144            *v = val;
24145        }
24146        Ok(__struct)
24147    }
24148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24149        let mut __tmp = BytesMut::new(bytes);
24150        #[allow(clippy::absurd_extreme_comparisons)]
24151        #[allow(unused_comparisons)]
24152        if __tmp.remaining() < Self::ENCODED_LEN {
24153            panic!(
24154                "buffer is too small (need {} bytes, but got {})",
24155                Self::ENCODED_LEN,
24156                __tmp.remaining(),
24157            )
24158        }
24159        __tmp.put_u8(self.target_system);
24160        __tmp.put_u8(self.target_component);
24161        for val in &self.tune {
24162            __tmp.put_u8(*val);
24163        }
24164        for val in &self.tune2 {
24165            __tmp.put_u8(*val);
24166        }
24167        if matches!(version, MavlinkVersion::V2) {
24168            let len = __tmp.len();
24169            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24170        } else {
24171            __tmp.len()
24172        }
24173    }
24174}
24175#[doc = "id: 400"]
24176#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24177#[derive(Debug, Clone, PartialEq)]
24178#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24179#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24180pub struct PLAY_TUNE_V2_DATA {
24181    #[doc = "Tune format"]
24182    pub format: TuneFormat,
24183    #[doc = "System ID"]
24184    pub target_system: u8,
24185    #[doc = "Component ID"]
24186    pub target_component: u8,
24187    #[doc = "Tune definition as a NULL-terminated string."]
24188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24189    pub tune: [u8; 248],
24190}
24191impl PLAY_TUNE_V2_DATA {
24192    pub const ENCODED_LEN: usize = 254usize;
24193    pub const DEFAULT: Self = Self {
24194        format: TuneFormat::DEFAULT,
24195        target_system: 0_u8,
24196        target_component: 0_u8,
24197        tune: [0_u8; 248usize],
24198    };
24199    #[cfg(feature = "arbitrary")]
24200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24201        use arbitrary::{Arbitrary, Unstructured};
24202        let mut buf = [0u8; 1024];
24203        rng.fill_bytes(&mut buf);
24204        let mut unstructured = Unstructured::new(&buf);
24205        Self::arbitrary(&mut unstructured).unwrap_or_default()
24206    }
24207}
24208impl Default for PLAY_TUNE_V2_DATA {
24209    fn default() -> Self {
24210        Self::DEFAULT.clone()
24211    }
24212}
24213impl MessageData for PLAY_TUNE_V2_DATA {
24214    type Message = MavMessage;
24215    const ID: u32 = 400u32;
24216    const NAME: &'static str = "PLAY_TUNE_V2";
24217    const EXTRA_CRC: u8 = 110u8;
24218    const ENCODED_LEN: usize = 254usize;
24219    fn deser(
24220        _version: MavlinkVersion,
24221        __input: &[u8],
24222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24223        let avail_len = __input.len();
24224        let mut payload_buf = [0; Self::ENCODED_LEN];
24225        let mut buf = if avail_len < Self::ENCODED_LEN {
24226            payload_buf[0..avail_len].copy_from_slice(__input);
24227            Bytes::new(&payload_buf)
24228        } else {
24229            Bytes::new(__input)
24230        };
24231        let mut __struct = Self::default();
24232        let tmp = buf.get_u32_le();
24233        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24234            ::mavlink_core::error::ParserError::InvalidEnum {
24235                enum_type: "TuneFormat",
24236                value: tmp as u32,
24237            },
24238        )?;
24239        __struct.target_system = buf.get_u8();
24240        __struct.target_component = buf.get_u8();
24241        for v in &mut __struct.tune {
24242            let val = buf.get_u8();
24243            *v = val;
24244        }
24245        Ok(__struct)
24246    }
24247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24248        let mut __tmp = BytesMut::new(bytes);
24249        #[allow(clippy::absurd_extreme_comparisons)]
24250        #[allow(unused_comparisons)]
24251        if __tmp.remaining() < Self::ENCODED_LEN {
24252            panic!(
24253                "buffer is too small (need {} bytes, but got {})",
24254                Self::ENCODED_LEN,
24255                __tmp.remaining(),
24256            )
24257        }
24258        __tmp.put_u32_le(self.format as u32);
24259        __tmp.put_u8(self.target_system);
24260        __tmp.put_u8(self.target_component);
24261        for val in &self.tune {
24262            __tmp.put_u8(*val);
24263        }
24264        if matches!(version, MavlinkVersion::V2) {
24265            let len = __tmp.len();
24266            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24267        } else {
24268            __tmp.len()
24269        }
24270    }
24271}
24272#[doc = "id: 87"]
24273#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24274#[derive(Debug, Clone, PartialEq)]
24275#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24276#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24277pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24278    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24279    pub time_boot_ms: u32,
24280    #[doc = "Latitude in WGS84 frame"]
24281    pub lat_int: i32,
24282    #[doc = "Longitude in WGS84 frame"]
24283    pub lon_int: i32,
24284    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24285    pub alt: f32,
24286    #[doc = "X velocity in NED frame"]
24287    pub vx: f32,
24288    #[doc = "Y velocity in NED frame"]
24289    pub vy: f32,
24290    #[doc = "Z velocity in NED frame"]
24291    pub vz: f32,
24292    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24293    pub afx: f32,
24294    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24295    pub afy: f32,
24296    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24297    pub afz: f32,
24298    #[doc = "yaw setpoint"]
24299    pub yaw: f32,
24300    #[doc = "yaw rate setpoint"]
24301    pub yaw_rate: f32,
24302    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24303    pub type_mask: PositionTargetTypemask,
24304    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24305    pub coordinate_frame: MavFrame,
24306}
24307impl POSITION_TARGET_GLOBAL_INT_DATA {
24308    pub const ENCODED_LEN: usize = 51usize;
24309    pub const DEFAULT: Self = Self {
24310        time_boot_ms: 0_u32,
24311        lat_int: 0_i32,
24312        lon_int: 0_i32,
24313        alt: 0.0_f32,
24314        vx: 0.0_f32,
24315        vy: 0.0_f32,
24316        vz: 0.0_f32,
24317        afx: 0.0_f32,
24318        afy: 0.0_f32,
24319        afz: 0.0_f32,
24320        yaw: 0.0_f32,
24321        yaw_rate: 0.0_f32,
24322        type_mask: PositionTargetTypemask::DEFAULT,
24323        coordinate_frame: MavFrame::DEFAULT,
24324    };
24325    #[cfg(feature = "arbitrary")]
24326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24327        use arbitrary::{Arbitrary, Unstructured};
24328        let mut buf = [0u8; 1024];
24329        rng.fill_bytes(&mut buf);
24330        let mut unstructured = Unstructured::new(&buf);
24331        Self::arbitrary(&mut unstructured).unwrap_or_default()
24332    }
24333}
24334impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24335    fn default() -> Self {
24336        Self::DEFAULT.clone()
24337    }
24338}
24339impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24340    type Message = MavMessage;
24341    const ID: u32 = 87u32;
24342    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24343    const EXTRA_CRC: u8 = 150u8;
24344    const ENCODED_LEN: usize = 51usize;
24345    fn deser(
24346        _version: MavlinkVersion,
24347        __input: &[u8],
24348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24349        let avail_len = __input.len();
24350        let mut payload_buf = [0; Self::ENCODED_LEN];
24351        let mut buf = if avail_len < Self::ENCODED_LEN {
24352            payload_buf[0..avail_len].copy_from_slice(__input);
24353            Bytes::new(&payload_buf)
24354        } else {
24355            Bytes::new(__input)
24356        };
24357        let mut __struct = Self::default();
24358        __struct.time_boot_ms = buf.get_u32_le();
24359        __struct.lat_int = buf.get_i32_le();
24360        __struct.lon_int = buf.get_i32_le();
24361        __struct.alt = buf.get_f32_le();
24362        __struct.vx = buf.get_f32_le();
24363        __struct.vy = buf.get_f32_le();
24364        __struct.vz = buf.get_f32_le();
24365        __struct.afx = buf.get_f32_le();
24366        __struct.afy = buf.get_f32_le();
24367        __struct.afz = buf.get_f32_le();
24368        __struct.yaw = buf.get_f32_le();
24369        __struct.yaw_rate = buf.get_f32_le();
24370        let tmp = buf.get_u16_le();
24371        __struct.type_mask = PositionTargetTypemask::from_bits(
24372            tmp & PositionTargetTypemask::all().bits(),
24373        )
24374        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24375            flag_type: "PositionTargetTypemask",
24376            value: tmp as u32,
24377        })?;
24378        let tmp = buf.get_u8();
24379        __struct.coordinate_frame =
24380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24381                enum_type: "MavFrame",
24382                value: tmp as u32,
24383            })?;
24384        Ok(__struct)
24385    }
24386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24387        let mut __tmp = BytesMut::new(bytes);
24388        #[allow(clippy::absurd_extreme_comparisons)]
24389        #[allow(unused_comparisons)]
24390        if __tmp.remaining() < Self::ENCODED_LEN {
24391            panic!(
24392                "buffer is too small (need {} bytes, but got {})",
24393                Self::ENCODED_LEN,
24394                __tmp.remaining(),
24395            )
24396        }
24397        __tmp.put_u32_le(self.time_boot_ms);
24398        __tmp.put_i32_le(self.lat_int);
24399        __tmp.put_i32_le(self.lon_int);
24400        __tmp.put_f32_le(self.alt);
24401        __tmp.put_f32_le(self.vx);
24402        __tmp.put_f32_le(self.vy);
24403        __tmp.put_f32_le(self.vz);
24404        __tmp.put_f32_le(self.afx);
24405        __tmp.put_f32_le(self.afy);
24406        __tmp.put_f32_le(self.afz);
24407        __tmp.put_f32_le(self.yaw);
24408        __tmp.put_f32_le(self.yaw_rate);
24409        __tmp.put_u16_le(self.type_mask.bits());
24410        __tmp.put_u8(self.coordinate_frame as u8);
24411        if matches!(version, MavlinkVersion::V2) {
24412            let len = __tmp.len();
24413            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24414        } else {
24415            __tmp.len()
24416        }
24417    }
24418}
24419#[doc = "id: 85"]
24420#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24421#[derive(Debug, Clone, PartialEq)]
24422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24424pub struct POSITION_TARGET_LOCAL_NED_DATA {
24425    #[doc = "Timestamp (time since system boot)."]
24426    pub time_boot_ms: u32,
24427    #[doc = "X Position in NED frame"]
24428    pub x: f32,
24429    #[doc = "Y Position in NED frame"]
24430    pub y: f32,
24431    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24432    pub z: f32,
24433    #[doc = "X velocity in NED frame"]
24434    pub vx: f32,
24435    #[doc = "Y velocity in NED frame"]
24436    pub vy: f32,
24437    #[doc = "Z velocity in NED frame"]
24438    pub vz: f32,
24439    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24440    pub afx: f32,
24441    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24442    pub afy: f32,
24443    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24444    pub afz: f32,
24445    #[doc = "yaw setpoint"]
24446    pub yaw: f32,
24447    #[doc = "yaw rate setpoint"]
24448    pub yaw_rate: f32,
24449    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24450    pub type_mask: PositionTargetTypemask,
24451    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24452    pub coordinate_frame: MavFrame,
24453}
24454impl POSITION_TARGET_LOCAL_NED_DATA {
24455    pub const ENCODED_LEN: usize = 51usize;
24456    pub const DEFAULT: Self = Self {
24457        time_boot_ms: 0_u32,
24458        x: 0.0_f32,
24459        y: 0.0_f32,
24460        z: 0.0_f32,
24461        vx: 0.0_f32,
24462        vy: 0.0_f32,
24463        vz: 0.0_f32,
24464        afx: 0.0_f32,
24465        afy: 0.0_f32,
24466        afz: 0.0_f32,
24467        yaw: 0.0_f32,
24468        yaw_rate: 0.0_f32,
24469        type_mask: PositionTargetTypemask::DEFAULT,
24470        coordinate_frame: MavFrame::DEFAULT,
24471    };
24472    #[cfg(feature = "arbitrary")]
24473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24474        use arbitrary::{Arbitrary, Unstructured};
24475        let mut buf = [0u8; 1024];
24476        rng.fill_bytes(&mut buf);
24477        let mut unstructured = Unstructured::new(&buf);
24478        Self::arbitrary(&mut unstructured).unwrap_or_default()
24479    }
24480}
24481impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24482    fn default() -> Self {
24483        Self::DEFAULT.clone()
24484    }
24485}
24486impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24487    type Message = MavMessage;
24488    const ID: u32 = 85u32;
24489    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24490    const EXTRA_CRC: u8 = 140u8;
24491    const ENCODED_LEN: usize = 51usize;
24492    fn deser(
24493        _version: MavlinkVersion,
24494        __input: &[u8],
24495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24496        let avail_len = __input.len();
24497        let mut payload_buf = [0; Self::ENCODED_LEN];
24498        let mut buf = if avail_len < Self::ENCODED_LEN {
24499            payload_buf[0..avail_len].copy_from_slice(__input);
24500            Bytes::new(&payload_buf)
24501        } else {
24502            Bytes::new(__input)
24503        };
24504        let mut __struct = Self::default();
24505        __struct.time_boot_ms = buf.get_u32_le();
24506        __struct.x = buf.get_f32_le();
24507        __struct.y = buf.get_f32_le();
24508        __struct.z = buf.get_f32_le();
24509        __struct.vx = buf.get_f32_le();
24510        __struct.vy = buf.get_f32_le();
24511        __struct.vz = buf.get_f32_le();
24512        __struct.afx = buf.get_f32_le();
24513        __struct.afy = buf.get_f32_le();
24514        __struct.afz = buf.get_f32_le();
24515        __struct.yaw = buf.get_f32_le();
24516        __struct.yaw_rate = buf.get_f32_le();
24517        let tmp = buf.get_u16_le();
24518        __struct.type_mask = PositionTargetTypemask::from_bits(
24519            tmp & PositionTargetTypemask::all().bits(),
24520        )
24521        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24522            flag_type: "PositionTargetTypemask",
24523            value: tmp as u32,
24524        })?;
24525        let tmp = buf.get_u8();
24526        __struct.coordinate_frame =
24527            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24528                enum_type: "MavFrame",
24529                value: tmp as u32,
24530            })?;
24531        Ok(__struct)
24532    }
24533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24534        let mut __tmp = BytesMut::new(bytes);
24535        #[allow(clippy::absurd_extreme_comparisons)]
24536        #[allow(unused_comparisons)]
24537        if __tmp.remaining() < Self::ENCODED_LEN {
24538            panic!(
24539                "buffer is too small (need {} bytes, but got {})",
24540                Self::ENCODED_LEN,
24541                __tmp.remaining(),
24542            )
24543        }
24544        __tmp.put_u32_le(self.time_boot_ms);
24545        __tmp.put_f32_le(self.x);
24546        __tmp.put_f32_le(self.y);
24547        __tmp.put_f32_le(self.z);
24548        __tmp.put_f32_le(self.vx);
24549        __tmp.put_f32_le(self.vy);
24550        __tmp.put_f32_le(self.vz);
24551        __tmp.put_f32_le(self.afx);
24552        __tmp.put_f32_le(self.afy);
24553        __tmp.put_f32_le(self.afz);
24554        __tmp.put_f32_le(self.yaw);
24555        __tmp.put_f32_le(self.yaw_rate);
24556        __tmp.put_u16_le(self.type_mask.bits());
24557        __tmp.put_u8(self.coordinate_frame as u8);
24558        if matches!(version, MavlinkVersion::V2) {
24559            let len = __tmp.len();
24560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24561        } else {
24562            __tmp.len()
24563        }
24564    }
24565}
24566#[doc = "id: 125"]
24567#[doc = "Power supply status."]
24568#[derive(Debug, Clone, PartialEq)]
24569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24571pub struct POWER_STATUS_DATA {
24572    #[doc = "5V rail voltage."]
24573    pub Vcc: u16,
24574    #[doc = "Servo rail voltage."]
24575    pub Vservo: u16,
24576    #[doc = "Bitmap of power supply status flags."]
24577    pub flags: MavPowerStatus,
24578}
24579impl POWER_STATUS_DATA {
24580    pub const ENCODED_LEN: usize = 6usize;
24581    pub const DEFAULT: Self = Self {
24582        Vcc: 0_u16,
24583        Vservo: 0_u16,
24584        flags: MavPowerStatus::DEFAULT,
24585    };
24586    #[cfg(feature = "arbitrary")]
24587    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24588        use arbitrary::{Arbitrary, Unstructured};
24589        let mut buf = [0u8; 1024];
24590        rng.fill_bytes(&mut buf);
24591        let mut unstructured = Unstructured::new(&buf);
24592        Self::arbitrary(&mut unstructured).unwrap_or_default()
24593    }
24594}
24595impl Default for POWER_STATUS_DATA {
24596    fn default() -> Self {
24597        Self::DEFAULT.clone()
24598    }
24599}
24600impl MessageData for POWER_STATUS_DATA {
24601    type Message = MavMessage;
24602    const ID: u32 = 125u32;
24603    const NAME: &'static str = "POWER_STATUS";
24604    const EXTRA_CRC: u8 = 203u8;
24605    const ENCODED_LEN: usize = 6usize;
24606    fn deser(
24607        _version: MavlinkVersion,
24608        __input: &[u8],
24609    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24610        let avail_len = __input.len();
24611        let mut payload_buf = [0; Self::ENCODED_LEN];
24612        let mut buf = if avail_len < Self::ENCODED_LEN {
24613            payload_buf[0..avail_len].copy_from_slice(__input);
24614            Bytes::new(&payload_buf)
24615        } else {
24616            Bytes::new(__input)
24617        };
24618        let mut __struct = Self::default();
24619        __struct.Vcc = buf.get_u16_le();
24620        __struct.Vservo = buf.get_u16_le();
24621        let tmp = buf.get_u16_le();
24622        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24623            ::mavlink_core::error::ParserError::InvalidFlag {
24624                flag_type: "MavPowerStatus",
24625                value: tmp as u32,
24626            },
24627        )?;
24628        Ok(__struct)
24629    }
24630    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24631        let mut __tmp = BytesMut::new(bytes);
24632        #[allow(clippy::absurd_extreme_comparisons)]
24633        #[allow(unused_comparisons)]
24634        if __tmp.remaining() < Self::ENCODED_LEN {
24635            panic!(
24636                "buffer is too small (need {} bytes, but got {})",
24637                Self::ENCODED_LEN,
24638                __tmp.remaining(),
24639            )
24640        }
24641        __tmp.put_u16_le(self.Vcc);
24642        __tmp.put_u16_le(self.Vservo);
24643        __tmp.put_u16_le(self.flags.bits());
24644        if matches!(version, MavlinkVersion::V2) {
24645            let len = __tmp.len();
24646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24647        } else {
24648            __tmp.len()
24649        }
24650    }
24651}
24652#[doc = "id: 300"]
24653#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24654#[derive(Debug, Clone, PartialEq)]
24655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24657pub struct PROTOCOL_VERSION_DATA {
24658    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24659    pub version: u16,
24660    #[doc = "Minimum MAVLink version supported"]
24661    pub min_version: u16,
24662    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24663    pub max_version: u16,
24664    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24666    pub spec_version_hash: [u8; 8],
24667    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24669    pub library_version_hash: [u8; 8],
24670}
24671impl PROTOCOL_VERSION_DATA {
24672    pub const ENCODED_LEN: usize = 22usize;
24673    pub const DEFAULT: Self = Self {
24674        version: 0_u16,
24675        min_version: 0_u16,
24676        max_version: 0_u16,
24677        spec_version_hash: [0_u8; 8usize],
24678        library_version_hash: [0_u8; 8usize],
24679    };
24680    #[cfg(feature = "arbitrary")]
24681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24682        use arbitrary::{Arbitrary, Unstructured};
24683        let mut buf = [0u8; 1024];
24684        rng.fill_bytes(&mut buf);
24685        let mut unstructured = Unstructured::new(&buf);
24686        Self::arbitrary(&mut unstructured).unwrap_or_default()
24687    }
24688}
24689impl Default for PROTOCOL_VERSION_DATA {
24690    fn default() -> Self {
24691        Self::DEFAULT.clone()
24692    }
24693}
24694impl MessageData for PROTOCOL_VERSION_DATA {
24695    type Message = MavMessage;
24696    const ID: u32 = 300u32;
24697    const NAME: &'static str = "PROTOCOL_VERSION";
24698    const EXTRA_CRC: u8 = 217u8;
24699    const ENCODED_LEN: usize = 22usize;
24700    fn deser(
24701        _version: MavlinkVersion,
24702        __input: &[u8],
24703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24704        let avail_len = __input.len();
24705        let mut payload_buf = [0; Self::ENCODED_LEN];
24706        let mut buf = if avail_len < Self::ENCODED_LEN {
24707            payload_buf[0..avail_len].copy_from_slice(__input);
24708            Bytes::new(&payload_buf)
24709        } else {
24710            Bytes::new(__input)
24711        };
24712        let mut __struct = Self::default();
24713        __struct.version = buf.get_u16_le();
24714        __struct.min_version = buf.get_u16_le();
24715        __struct.max_version = buf.get_u16_le();
24716        for v in &mut __struct.spec_version_hash {
24717            let val = buf.get_u8();
24718            *v = val;
24719        }
24720        for v in &mut __struct.library_version_hash {
24721            let val = buf.get_u8();
24722            *v = val;
24723        }
24724        Ok(__struct)
24725    }
24726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24727        let mut __tmp = BytesMut::new(bytes);
24728        #[allow(clippy::absurd_extreme_comparisons)]
24729        #[allow(unused_comparisons)]
24730        if __tmp.remaining() < Self::ENCODED_LEN {
24731            panic!(
24732                "buffer is too small (need {} bytes, but got {})",
24733                Self::ENCODED_LEN,
24734                __tmp.remaining(),
24735            )
24736        }
24737        __tmp.put_u16_le(self.version);
24738        __tmp.put_u16_le(self.min_version);
24739        __tmp.put_u16_le(self.max_version);
24740        for val in &self.spec_version_hash {
24741            __tmp.put_u8(*val);
24742        }
24743        for val in &self.library_version_hash {
24744            __tmp.put_u8(*val);
24745        }
24746        if matches!(version, MavlinkVersion::V2) {
24747            let len = __tmp.len();
24748            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24749        } else {
24750            __tmp.len()
24751        }
24752    }
24753}
24754#[doc = "id: 109"]
24755#[doc = "Status generated by radio and injected into MAVLink stream."]
24756#[derive(Debug, Clone, PartialEq)]
24757#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24758#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24759pub struct RADIO_STATUS_DATA {
24760    #[doc = "Count of radio packet receive errors (since boot)."]
24761    pub rxerrors: u16,
24762    #[doc = "Count of error corrected radio packets (since boot)."]
24763    pub fixed: u16,
24764    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24765    pub rssi: u8,
24766    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24767    pub remrssi: u8,
24768    #[doc = "Remaining free transmitter buffer space."]
24769    pub txbuf: u8,
24770    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24771    pub noise: u8,
24772    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24773    pub remnoise: u8,
24774}
24775impl RADIO_STATUS_DATA {
24776    pub const ENCODED_LEN: usize = 9usize;
24777    pub const DEFAULT: Self = Self {
24778        rxerrors: 0_u16,
24779        fixed: 0_u16,
24780        rssi: 0_u8,
24781        remrssi: 0_u8,
24782        txbuf: 0_u8,
24783        noise: 0_u8,
24784        remnoise: 0_u8,
24785    };
24786    #[cfg(feature = "arbitrary")]
24787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24788        use arbitrary::{Arbitrary, Unstructured};
24789        let mut buf = [0u8; 1024];
24790        rng.fill_bytes(&mut buf);
24791        let mut unstructured = Unstructured::new(&buf);
24792        Self::arbitrary(&mut unstructured).unwrap_or_default()
24793    }
24794}
24795impl Default for RADIO_STATUS_DATA {
24796    fn default() -> Self {
24797        Self::DEFAULT.clone()
24798    }
24799}
24800impl MessageData for RADIO_STATUS_DATA {
24801    type Message = MavMessage;
24802    const ID: u32 = 109u32;
24803    const NAME: &'static str = "RADIO_STATUS";
24804    const EXTRA_CRC: u8 = 185u8;
24805    const ENCODED_LEN: usize = 9usize;
24806    fn deser(
24807        _version: MavlinkVersion,
24808        __input: &[u8],
24809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24810        let avail_len = __input.len();
24811        let mut payload_buf = [0; Self::ENCODED_LEN];
24812        let mut buf = if avail_len < Self::ENCODED_LEN {
24813            payload_buf[0..avail_len].copy_from_slice(__input);
24814            Bytes::new(&payload_buf)
24815        } else {
24816            Bytes::new(__input)
24817        };
24818        let mut __struct = Self::default();
24819        __struct.rxerrors = buf.get_u16_le();
24820        __struct.fixed = buf.get_u16_le();
24821        __struct.rssi = buf.get_u8();
24822        __struct.remrssi = buf.get_u8();
24823        __struct.txbuf = buf.get_u8();
24824        __struct.noise = buf.get_u8();
24825        __struct.remnoise = buf.get_u8();
24826        Ok(__struct)
24827    }
24828    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24829        let mut __tmp = BytesMut::new(bytes);
24830        #[allow(clippy::absurd_extreme_comparisons)]
24831        #[allow(unused_comparisons)]
24832        if __tmp.remaining() < Self::ENCODED_LEN {
24833            panic!(
24834                "buffer is too small (need {} bytes, but got {})",
24835                Self::ENCODED_LEN,
24836                __tmp.remaining(),
24837            )
24838        }
24839        __tmp.put_u16_le(self.rxerrors);
24840        __tmp.put_u16_le(self.fixed);
24841        __tmp.put_u8(self.rssi);
24842        __tmp.put_u8(self.remrssi);
24843        __tmp.put_u8(self.txbuf);
24844        __tmp.put_u8(self.noise);
24845        __tmp.put_u8(self.remnoise);
24846        if matches!(version, MavlinkVersion::V2) {
24847            let len = __tmp.len();
24848            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24849        } else {
24850            __tmp.len()
24851        }
24852    }
24853}
24854#[doc = "id: 27"]
24855#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24856#[derive(Debug, Clone, PartialEq)]
24857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24859pub struct RAW_IMU_DATA {
24860    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24861    pub time_usec: u64,
24862    #[doc = "X acceleration (raw)"]
24863    pub xacc: i16,
24864    #[doc = "Y acceleration (raw)"]
24865    pub yacc: i16,
24866    #[doc = "Z acceleration (raw)"]
24867    pub zacc: i16,
24868    #[doc = "Angular speed around X axis (raw)"]
24869    pub xgyro: i16,
24870    #[doc = "Angular speed around Y axis (raw)"]
24871    pub ygyro: i16,
24872    #[doc = "Angular speed around Z axis (raw)"]
24873    pub zgyro: i16,
24874    #[doc = "X Magnetic field (raw)"]
24875    pub xmag: i16,
24876    #[doc = "Y Magnetic field (raw)"]
24877    pub ymag: i16,
24878    #[doc = "Z Magnetic field (raw)"]
24879    pub zmag: i16,
24880    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24881    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24882    pub id: u8,
24883    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24885    pub temperature: i16,
24886}
24887impl RAW_IMU_DATA {
24888    pub const ENCODED_LEN: usize = 29usize;
24889    pub const DEFAULT: Self = Self {
24890        time_usec: 0_u64,
24891        xacc: 0_i16,
24892        yacc: 0_i16,
24893        zacc: 0_i16,
24894        xgyro: 0_i16,
24895        ygyro: 0_i16,
24896        zgyro: 0_i16,
24897        xmag: 0_i16,
24898        ymag: 0_i16,
24899        zmag: 0_i16,
24900        id: 0_u8,
24901        temperature: 0_i16,
24902    };
24903    #[cfg(feature = "arbitrary")]
24904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24905        use arbitrary::{Arbitrary, Unstructured};
24906        let mut buf = [0u8; 1024];
24907        rng.fill_bytes(&mut buf);
24908        let mut unstructured = Unstructured::new(&buf);
24909        Self::arbitrary(&mut unstructured).unwrap_or_default()
24910    }
24911}
24912impl Default for RAW_IMU_DATA {
24913    fn default() -> Self {
24914        Self::DEFAULT.clone()
24915    }
24916}
24917impl MessageData for RAW_IMU_DATA {
24918    type Message = MavMessage;
24919    const ID: u32 = 27u32;
24920    const NAME: &'static str = "RAW_IMU";
24921    const EXTRA_CRC: u8 = 144u8;
24922    const ENCODED_LEN: usize = 29usize;
24923    fn deser(
24924        _version: MavlinkVersion,
24925        __input: &[u8],
24926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24927        let avail_len = __input.len();
24928        let mut payload_buf = [0; Self::ENCODED_LEN];
24929        let mut buf = if avail_len < Self::ENCODED_LEN {
24930            payload_buf[0..avail_len].copy_from_slice(__input);
24931            Bytes::new(&payload_buf)
24932        } else {
24933            Bytes::new(__input)
24934        };
24935        let mut __struct = Self::default();
24936        __struct.time_usec = buf.get_u64_le();
24937        __struct.xacc = buf.get_i16_le();
24938        __struct.yacc = buf.get_i16_le();
24939        __struct.zacc = buf.get_i16_le();
24940        __struct.xgyro = buf.get_i16_le();
24941        __struct.ygyro = buf.get_i16_le();
24942        __struct.zgyro = buf.get_i16_le();
24943        __struct.xmag = buf.get_i16_le();
24944        __struct.ymag = buf.get_i16_le();
24945        __struct.zmag = buf.get_i16_le();
24946        __struct.id = buf.get_u8();
24947        __struct.temperature = buf.get_i16_le();
24948        Ok(__struct)
24949    }
24950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24951        let mut __tmp = BytesMut::new(bytes);
24952        #[allow(clippy::absurd_extreme_comparisons)]
24953        #[allow(unused_comparisons)]
24954        if __tmp.remaining() < Self::ENCODED_LEN {
24955            panic!(
24956                "buffer is too small (need {} bytes, but got {})",
24957                Self::ENCODED_LEN,
24958                __tmp.remaining(),
24959            )
24960        }
24961        __tmp.put_u64_le(self.time_usec);
24962        __tmp.put_i16_le(self.xacc);
24963        __tmp.put_i16_le(self.yacc);
24964        __tmp.put_i16_le(self.zacc);
24965        __tmp.put_i16_le(self.xgyro);
24966        __tmp.put_i16_le(self.ygyro);
24967        __tmp.put_i16_le(self.zgyro);
24968        __tmp.put_i16_le(self.xmag);
24969        __tmp.put_i16_le(self.ymag);
24970        __tmp.put_i16_le(self.zmag);
24971        __tmp.put_u8(self.id);
24972        __tmp.put_i16_le(self.temperature);
24973        if matches!(version, MavlinkVersion::V2) {
24974            let len = __tmp.len();
24975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24976        } else {
24977            __tmp.len()
24978        }
24979    }
24980}
24981#[doc = "id: 28"]
24982#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24983#[derive(Debug, Clone, PartialEq)]
24984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24986pub struct RAW_PRESSURE_DATA {
24987    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24988    pub time_usec: u64,
24989    #[doc = "Absolute pressure (raw)"]
24990    pub press_abs: i16,
24991    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
24992    pub press_diff1: i16,
24993    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
24994    pub press_diff2: i16,
24995    #[doc = "Raw Temperature measurement (raw)"]
24996    pub temperature: i16,
24997}
24998impl RAW_PRESSURE_DATA {
24999    pub const ENCODED_LEN: usize = 16usize;
25000    pub const DEFAULT: Self = Self {
25001        time_usec: 0_u64,
25002        press_abs: 0_i16,
25003        press_diff1: 0_i16,
25004        press_diff2: 0_i16,
25005        temperature: 0_i16,
25006    };
25007    #[cfg(feature = "arbitrary")]
25008    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25009        use arbitrary::{Arbitrary, Unstructured};
25010        let mut buf = [0u8; 1024];
25011        rng.fill_bytes(&mut buf);
25012        let mut unstructured = Unstructured::new(&buf);
25013        Self::arbitrary(&mut unstructured).unwrap_or_default()
25014    }
25015}
25016impl Default for RAW_PRESSURE_DATA {
25017    fn default() -> Self {
25018        Self::DEFAULT.clone()
25019    }
25020}
25021impl MessageData for RAW_PRESSURE_DATA {
25022    type Message = MavMessage;
25023    const ID: u32 = 28u32;
25024    const NAME: &'static str = "RAW_PRESSURE";
25025    const EXTRA_CRC: u8 = 67u8;
25026    const ENCODED_LEN: usize = 16usize;
25027    fn deser(
25028        _version: MavlinkVersion,
25029        __input: &[u8],
25030    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25031        let avail_len = __input.len();
25032        let mut payload_buf = [0; Self::ENCODED_LEN];
25033        let mut buf = if avail_len < Self::ENCODED_LEN {
25034            payload_buf[0..avail_len].copy_from_slice(__input);
25035            Bytes::new(&payload_buf)
25036        } else {
25037            Bytes::new(__input)
25038        };
25039        let mut __struct = Self::default();
25040        __struct.time_usec = buf.get_u64_le();
25041        __struct.press_abs = buf.get_i16_le();
25042        __struct.press_diff1 = buf.get_i16_le();
25043        __struct.press_diff2 = buf.get_i16_le();
25044        __struct.temperature = buf.get_i16_le();
25045        Ok(__struct)
25046    }
25047    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25048        let mut __tmp = BytesMut::new(bytes);
25049        #[allow(clippy::absurd_extreme_comparisons)]
25050        #[allow(unused_comparisons)]
25051        if __tmp.remaining() < Self::ENCODED_LEN {
25052            panic!(
25053                "buffer is too small (need {} bytes, but got {})",
25054                Self::ENCODED_LEN,
25055                __tmp.remaining(),
25056            )
25057        }
25058        __tmp.put_u64_le(self.time_usec);
25059        __tmp.put_i16_le(self.press_abs);
25060        __tmp.put_i16_le(self.press_diff1);
25061        __tmp.put_i16_le(self.press_diff2);
25062        __tmp.put_i16_le(self.temperature);
25063        if matches!(version, MavlinkVersion::V2) {
25064            let len = __tmp.len();
25065            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25066        } else {
25067            __tmp.len()
25068        }
25069    }
25070}
25071#[doc = "id: 339"]
25072#[doc = "RPM sensor data message."]
25073#[derive(Debug, Clone, PartialEq)]
25074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25076pub struct RAW_RPM_DATA {
25077    #[doc = "Indicated rate"]
25078    pub frequency: f32,
25079    #[doc = "Index of this RPM sensor (0-indexed)"]
25080    pub index: u8,
25081}
25082impl RAW_RPM_DATA {
25083    pub const ENCODED_LEN: usize = 5usize;
25084    pub const DEFAULT: Self = Self {
25085        frequency: 0.0_f32,
25086        index: 0_u8,
25087    };
25088    #[cfg(feature = "arbitrary")]
25089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25090        use arbitrary::{Arbitrary, Unstructured};
25091        let mut buf = [0u8; 1024];
25092        rng.fill_bytes(&mut buf);
25093        let mut unstructured = Unstructured::new(&buf);
25094        Self::arbitrary(&mut unstructured).unwrap_or_default()
25095    }
25096}
25097impl Default for RAW_RPM_DATA {
25098    fn default() -> Self {
25099        Self::DEFAULT.clone()
25100    }
25101}
25102impl MessageData for RAW_RPM_DATA {
25103    type Message = MavMessage;
25104    const ID: u32 = 339u32;
25105    const NAME: &'static str = "RAW_RPM";
25106    const EXTRA_CRC: u8 = 199u8;
25107    const ENCODED_LEN: usize = 5usize;
25108    fn deser(
25109        _version: MavlinkVersion,
25110        __input: &[u8],
25111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25112        let avail_len = __input.len();
25113        let mut payload_buf = [0; Self::ENCODED_LEN];
25114        let mut buf = if avail_len < Self::ENCODED_LEN {
25115            payload_buf[0..avail_len].copy_from_slice(__input);
25116            Bytes::new(&payload_buf)
25117        } else {
25118            Bytes::new(__input)
25119        };
25120        let mut __struct = Self::default();
25121        __struct.frequency = buf.get_f32_le();
25122        __struct.index = buf.get_u8();
25123        Ok(__struct)
25124    }
25125    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25126        let mut __tmp = BytesMut::new(bytes);
25127        #[allow(clippy::absurd_extreme_comparisons)]
25128        #[allow(unused_comparisons)]
25129        if __tmp.remaining() < Self::ENCODED_LEN {
25130            panic!(
25131                "buffer is too small (need {} bytes, but got {})",
25132                Self::ENCODED_LEN,
25133                __tmp.remaining(),
25134            )
25135        }
25136        __tmp.put_f32_le(self.frequency);
25137        __tmp.put_u8(self.index);
25138        if matches!(version, MavlinkVersion::V2) {
25139            let len = __tmp.len();
25140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25141        } else {
25142            __tmp.len()
25143        }
25144    }
25145}
25146#[doc = "id: 65"]
25147#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25148#[derive(Debug, Clone, PartialEq)]
25149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25151pub struct RC_CHANNELS_DATA {
25152    #[doc = "Timestamp (time since system boot)."]
25153    pub time_boot_ms: u32,
25154    #[doc = "RC channel 1 value."]
25155    pub chan1_raw: u16,
25156    #[doc = "RC channel 2 value."]
25157    pub chan2_raw: u16,
25158    #[doc = "RC channel 3 value."]
25159    pub chan3_raw: u16,
25160    #[doc = "RC channel 4 value."]
25161    pub chan4_raw: u16,
25162    #[doc = "RC channel 5 value."]
25163    pub chan5_raw: u16,
25164    #[doc = "RC channel 6 value."]
25165    pub chan6_raw: u16,
25166    #[doc = "RC channel 7 value."]
25167    pub chan7_raw: u16,
25168    #[doc = "RC channel 8 value."]
25169    pub chan8_raw: u16,
25170    #[doc = "RC channel 9 value."]
25171    pub chan9_raw: u16,
25172    #[doc = "RC channel 10 value."]
25173    pub chan10_raw: u16,
25174    #[doc = "RC channel 11 value."]
25175    pub chan11_raw: u16,
25176    #[doc = "RC channel 12 value."]
25177    pub chan12_raw: u16,
25178    #[doc = "RC channel 13 value."]
25179    pub chan13_raw: u16,
25180    #[doc = "RC channel 14 value."]
25181    pub chan14_raw: u16,
25182    #[doc = "RC channel 15 value."]
25183    pub chan15_raw: u16,
25184    #[doc = "RC channel 16 value."]
25185    pub chan16_raw: u16,
25186    #[doc = "RC channel 17 value."]
25187    pub chan17_raw: u16,
25188    #[doc = "RC channel 18 value."]
25189    pub chan18_raw: u16,
25190    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25191    pub chancount: u8,
25192    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25193    pub rssi: u8,
25194}
25195impl RC_CHANNELS_DATA {
25196    pub const ENCODED_LEN: usize = 42usize;
25197    pub const DEFAULT: Self = Self {
25198        time_boot_ms: 0_u32,
25199        chan1_raw: 0_u16,
25200        chan2_raw: 0_u16,
25201        chan3_raw: 0_u16,
25202        chan4_raw: 0_u16,
25203        chan5_raw: 0_u16,
25204        chan6_raw: 0_u16,
25205        chan7_raw: 0_u16,
25206        chan8_raw: 0_u16,
25207        chan9_raw: 0_u16,
25208        chan10_raw: 0_u16,
25209        chan11_raw: 0_u16,
25210        chan12_raw: 0_u16,
25211        chan13_raw: 0_u16,
25212        chan14_raw: 0_u16,
25213        chan15_raw: 0_u16,
25214        chan16_raw: 0_u16,
25215        chan17_raw: 0_u16,
25216        chan18_raw: 0_u16,
25217        chancount: 0_u8,
25218        rssi: 0_u8,
25219    };
25220    #[cfg(feature = "arbitrary")]
25221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25222        use arbitrary::{Arbitrary, Unstructured};
25223        let mut buf = [0u8; 1024];
25224        rng.fill_bytes(&mut buf);
25225        let mut unstructured = Unstructured::new(&buf);
25226        Self::arbitrary(&mut unstructured).unwrap_or_default()
25227    }
25228}
25229impl Default for RC_CHANNELS_DATA {
25230    fn default() -> Self {
25231        Self::DEFAULT.clone()
25232    }
25233}
25234impl MessageData for RC_CHANNELS_DATA {
25235    type Message = MavMessage;
25236    const ID: u32 = 65u32;
25237    const NAME: &'static str = "RC_CHANNELS";
25238    const EXTRA_CRC: u8 = 118u8;
25239    const ENCODED_LEN: usize = 42usize;
25240    fn deser(
25241        _version: MavlinkVersion,
25242        __input: &[u8],
25243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25244        let avail_len = __input.len();
25245        let mut payload_buf = [0; Self::ENCODED_LEN];
25246        let mut buf = if avail_len < Self::ENCODED_LEN {
25247            payload_buf[0..avail_len].copy_from_slice(__input);
25248            Bytes::new(&payload_buf)
25249        } else {
25250            Bytes::new(__input)
25251        };
25252        let mut __struct = Self::default();
25253        __struct.time_boot_ms = buf.get_u32_le();
25254        __struct.chan1_raw = buf.get_u16_le();
25255        __struct.chan2_raw = buf.get_u16_le();
25256        __struct.chan3_raw = buf.get_u16_le();
25257        __struct.chan4_raw = buf.get_u16_le();
25258        __struct.chan5_raw = buf.get_u16_le();
25259        __struct.chan6_raw = buf.get_u16_le();
25260        __struct.chan7_raw = buf.get_u16_le();
25261        __struct.chan8_raw = buf.get_u16_le();
25262        __struct.chan9_raw = buf.get_u16_le();
25263        __struct.chan10_raw = buf.get_u16_le();
25264        __struct.chan11_raw = buf.get_u16_le();
25265        __struct.chan12_raw = buf.get_u16_le();
25266        __struct.chan13_raw = buf.get_u16_le();
25267        __struct.chan14_raw = buf.get_u16_le();
25268        __struct.chan15_raw = buf.get_u16_le();
25269        __struct.chan16_raw = buf.get_u16_le();
25270        __struct.chan17_raw = buf.get_u16_le();
25271        __struct.chan18_raw = buf.get_u16_le();
25272        __struct.chancount = buf.get_u8();
25273        __struct.rssi = buf.get_u8();
25274        Ok(__struct)
25275    }
25276    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25277        let mut __tmp = BytesMut::new(bytes);
25278        #[allow(clippy::absurd_extreme_comparisons)]
25279        #[allow(unused_comparisons)]
25280        if __tmp.remaining() < Self::ENCODED_LEN {
25281            panic!(
25282                "buffer is too small (need {} bytes, but got {})",
25283                Self::ENCODED_LEN,
25284                __tmp.remaining(),
25285            )
25286        }
25287        __tmp.put_u32_le(self.time_boot_ms);
25288        __tmp.put_u16_le(self.chan1_raw);
25289        __tmp.put_u16_le(self.chan2_raw);
25290        __tmp.put_u16_le(self.chan3_raw);
25291        __tmp.put_u16_le(self.chan4_raw);
25292        __tmp.put_u16_le(self.chan5_raw);
25293        __tmp.put_u16_le(self.chan6_raw);
25294        __tmp.put_u16_le(self.chan7_raw);
25295        __tmp.put_u16_le(self.chan8_raw);
25296        __tmp.put_u16_le(self.chan9_raw);
25297        __tmp.put_u16_le(self.chan10_raw);
25298        __tmp.put_u16_le(self.chan11_raw);
25299        __tmp.put_u16_le(self.chan12_raw);
25300        __tmp.put_u16_le(self.chan13_raw);
25301        __tmp.put_u16_le(self.chan14_raw);
25302        __tmp.put_u16_le(self.chan15_raw);
25303        __tmp.put_u16_le(self.chan16_raw);
25304        __tmp.put_u16_le(self.chan17_raw);
25305        __tmp.put_u16_le(self.chan18_raw);
25306        __tmp.put_u8(self.chancount);
25307        __tmp.put_u8(self.rssi);
25308        if matches!(version, MavlinkVersion::V2) {
25309            let len = __tmp.len();
25310            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25311        } else {
25312            __tmp.len()
25313        }
25314    }
25315}
25316#[doc = "id: 70"]
25317#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25318#[derive(Debug, Clone, PartialEq)]
25319#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25320#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25321pub struct RC_CHANNELS_OVERRIDE_DATA {
25322    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25323    pub chan1_raw: u16,
25324    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25325    pub chan2_raw: u16,
25326    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25327    pub chan3_raw: u16,
25328    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25329    pub chan4_raw: u16,
25330    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25331    pub chan5_raw: u16,
25332    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25333    pub chan6_raw: u16,
25334    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25335    pub chan7_raw: u16,
25336    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25337    pub chan8_raw: u16,
25338    #[doc = "System ID"]
25339    pub target_system: u8,
25340    #[doc = "Component ID"]
25341    pub target_component: u8,
25342    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25343    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25344    pub chan9_raw: u16,
25345    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25346    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25347    pub chan10_raw: u16,
25348    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25349    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25350    pub chan11_raw: u16,
25351    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25352    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25353    pub chan12_raw: u16,
25354    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25355    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25356    pub chan13_raw: u16,
25357    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25358    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25359    pub chan14_raw: u16,
25360    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25362    pub chan15_raw: u16,
25363    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25365    pub chan16_raw: u16,
25366    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25368    pub chan17_raw: u16,
25369    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25371    pub chan18_raw: u16,
25372}
25373impl RC_CHANNELS_OVERRIDE_DATA {
25374    pub const ENCODED_LEN: usize = 38usize;
25375    pub const DEFAULT: Self = Self {
25376        chan1_raw: 0_u16,
25377        chan2_raw: 0_u16,
25378        chan3_raw: 0_u16,
25379        chan4_raw: 0_u16,
25380        chan5_raw: 0_u16,
25381        chan6_raw: 0_u16,
25382        chan7_raw: 0_u16,
25383        chan8_raw: 0_u16,
25384        target_system: 0_u8,
25385        target_component: 0_u8,
25386        chan9_raw: 0_u16,
25387        chan10_raw: 0_u16,
25388        chan11_raw: 0_u16,
25389        chan12_raw: 0_u16,
25390        chan13_raw: 0_u16,
25391        chan14_raw: 0_u16,
25392        chan15_raw: 0_u16,
25393        chan16_raw: 0_u16,
25394        chan17_raw: 0_u16,
25395        chan18_raw: 0_u16,
25396    };
25397    #[cfg(feature = "arbitrary")]
25398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25399        use arbitrary::{Arbitrary, Unstructured};
25400        let mut buf = [0u8; 1024];
25401        rng.fill_bytes(&mut buf);
25402        let mut unstructured = Unstructured::new(&buf);
25403        Self::arbitrary(&mut unstructured).unwrap_or_default()
25404    }
25405}
25406impl Default for RC_CHANNELS_OVERRIDE_DATA {
25407    fn default() -> Self {
25408        Self::DEFAULT.clone()
25409    }
25410}
25411impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25412    type Message = MavMessage;
25413    const ID: u32 = 70u32;
25414    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25415    const EXTRA_CRC: u8 = 124u8;
25416    const ENCODED_LEN: usize = 38usize;
25417    fn deser(
25418        _version: MavlinkVersion,
25419        __input: &[u8],
25420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25421        let avail_len = __input.len();
25422        let mut payload_buf = [0; Self::ENCODED_LEN];
25423        let mut buf = if avail_len < Self::ENCODED_LEN {
25424            payload_buf[0..avail_len].copy_from_slice(__input);
25425            Bytes::new(&payload_buf)
25426        } else {
25427            Bytes::new(__input)
25428        };
25429        let mut __struct = Self::default();
25430        __struct.chan1_raw = buf.get_u16_le();
25431        __struct.chan2_raw = buf.get_u16_le();
25432        __struct.chan3_raw = buf.get_u16_le();
25433        __struct.chan4_raw = buf.get_u16_le();
25434        __struct.chan5_raw = buf.get_u16_le();
25435        __struct.chan6_raw = buf.get_u16_le();
25436        __struct.chan7_raw = buf.get_u16_le();
25437        __struct.chan8_raw = buf.get_u16_le();
25438        __struct.target_system = buf.get_u8();
25439        __struct.target_component = buf.get_u8();
25440        __struct.chan9_raw = buf.get_u16_le();
25441        __struct.chan10_raw = buf.get_u16_le();
25442        __struct.chan11_raw = buf.get_u16_le();
25443        __struct.chan12_raw = buf.get_u16_le();
25444        __struct.chan13_raw = buf.get_u16_le();
25445        __struct.chan14_raw = buf.get_u16_le();
25446        __struct.chan15_raw = buf.get_u16_le();
25447        __struct.chan16_raw = buf.get_u16_le();
25448        __struct.chan17_raw = buf.get_u16_le();
25449        __struct.chan18_raw = buf.get_u16_le();
25450        Ok(__struct)
25451    }
25452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25453        let mut __tmp = BytesMut::new(bytes);
25454        #[allow(clippy::absurd_extreme_comparisons)]
25455        #[allow(unused_comparisons)]
25456        if __tmp.remaining() < Self::ENCODED_LEN {
25457            panic!(
25458                "buffer is too small (need {} bytes, but got {})",
25459                Self::ENCODED_LEN,
25460                __tmp.remaining(),
25461            )
25462        }
25463        __tmp.put_u16_le(self.chan1_raw);
25464        __tmp.put_u16_le(self.chan2_raw);
25465        __tmp.put_u16_le(self.chan3_raw);
25466        __tmp.put_u16_le(self.chan4_raw);
25467        __tmp.put_u16_le(self.chan5_raw);
25468        __tmp.put_u16_le(self.chan6_raw);
25469        __tmp.put_u16_le(self.chan7_raw);
25470        __tmp.put_u16_le(self.chan8_raw);
25471        __tmp.put_u8(self.target_system);
25472        __tmp.put_u8(self.target_component);
25473        __tmp.put_u16_le(self.chan9_raw);
25474        __tmp.put_u16_le(self.chan10_raw);
25475        __tmp.put_u16_le(self.chan11_raw);
25476        __tmp.put_u16_le(self.chan12_raw);
25477        __tmp.put_u16_le(self.chan13_raw);
25478        __tmp.put_u16_le(self.chan14_raw);
25479        __tmp.put_u16_le(self.chan15_raw);
25480        __tmp.put_u16_le(self.chan16_raw);
25481        __tmp.put_u16_le(self.chan17_raw);
25482        __tmp.put_u16_le(self.chan18_raw);
25483        if matches!(version, MavlinkVersion::V2) {
25484            let len = __tmp.len();
25485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25486        } else {
25487            __tmp.len()
25488        }
25489    }
25490}
25491#[doc = "id: 35"]
25492#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25493#[derive(Debug, Clone, PartialEq)]
25494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25496pub struct RC_CHANNELS_RAW_DATA {
25497    #[doc = "Timestamp (time since system boot)."]
25498    pub time_boot_ms: u32,
25499    #[doc = "RC channel 1 value."]
25500    pub chan1_raw: u16,
25501    #[doc = "RC channel 2 value."]
25502    pub chan2_raw: u16,
25503    #[doc = "RC channel 3 value."]
25504    pub chan3_raw: u16,
25505    #[doc = "RC channel 4 value."]
25506    pub chan4_raw: u16,
25507    #[doc = "RC channel 5 value."]
25508    pub chan5_raw: u16,
25509    #[doc = "RC channel 6 value."]
25510    pub chan6_raw: u16,
25511    #[doc = "RC channel 7 value."]
25512    pub chan7_raw: u16,
25513    #[doc = "RC channel 8 value."]
25514    pub chan8_raw: u16,
25515    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25516    pub port: u8,
25517    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25518    pub rssi: u8,
25519}
25520impl RC_CHANNELS_RAW_DATA {
25521    pub const ENCODED_LEN: usize = 22usize;
25522    pub const DEFAULT: Self = Self {
25523        time_boot_ms: 0_u32,
25524        chan1_raw: 0_u16,
25525        chan2_raw: 0_u16,
25526        chan3_raw: 0_u16,
25527        chan4_raw: 0_u16,
25528        chan5_raw: 0_u16,
25529        chan6_raw: 0_u16,
25530        chan7_raw: 0_u16,
25531        chan8_raw: 0_u16,
25532        port: 0_u8,
25533        rssi: 0_u8,
25534    };
25535    #[cfg(feature = "arbitrary")]
25536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25537        use arbitrary::{Arbitrary, Unstructured};
25538        let mut buf = [0u8; 1024];
25539        rng.fill_bytes(&mut buf);
25540        let mut unstructured = Unstructured::new(&buf);
25541        Self::arbitrary(&mut unstructured).unwrap_or_default()
25542    }
25543}
25544impl Default for RC_CHANNELS_RAW_DATA {
25545    fn default() -> Self {
25546        Self::DEFAULT.clone()
25547    }
25548}
25549impl MessageData for RC_CHANNELS_RAW_DATA {
25550    type Message = MavMessage;
25551    const ID: u32 = 35u32;
25552    const NAME: &'static str = "RC_CHANNELS_RAW";
25553    const EXTRA_CRC: u8 = 244u8;
25554    const ENCODED_LEN: usize = 22usize;
25555    fn deser(
25556        _version: MavlinkVersion,
25557        __input: &[u8],
25558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25559        let avail_len = __input.len();
25560        let mut payload_buf = [0; Self::ENCODED_LEN];
25561        let mut buf = if avail_len < Self::ENCODED_LEN {
25562            payload_buf[0..avail_len].copy_from_slice(__input);
25563            Bytes::new(&payload_buf)
25564        } else {
25565            Bytes::new(__input)
25566        };
25567        let mut __struct = Self::default();
25568        __struct.time_boot_ms = buf.get_u32_le();
25569        __struct.chan1_raw = buf.get_u16_le();
25570        __struct.chan2_raw = buf.get_u16_le();
25571        __struct.chan3_raw = buf.get_u16_le();
25572        __struct.chan4_raw = buf.get_u16_le();
25573        __struct.chan5_raw = buf.get_u16_le();
25574        __struct.chan6_raw = buf.get_u16_le();
25575        __struct.chan7_raw = buf.get_u16_le();
25576        __struct.chan8_raw = buf.get_u16_le();
25577        __struct.port = buf.get_u8();
25578        __struct.rssi = buf.get_u8();
25579        Ok(__struct)
25580    }
25581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25582        let mut __tmp = BytesMut::new(bytes);
25583        #[allow(clippy::absurd_extreme_comparisons)]
25584        #[allow(unused_comparisons)]
25585        if __tmp.remaining() < Self::ENCODED_LEN {
25586            panic!(
25587                "buffer is too small (need {} bytes, but got {})",
25588                Self::ENCODED_LEN,
25589                __tmp.remaining(),
25590            )
25591        }
25592        __tmp.put_u32_le(self.time_boot_ms);
25593        __tmp.put_u16_le(self.chan1_raw);
25594        __tmp.put_u16_le(self.chan2_raw);
25595        __tmp.put_u16_le(self.chan3_raw);
25596        __tmp.put_u16_le(self.chan4_raw);
25597        __tmp.put_u16_le(self.chan5_raw);
25598        __tmp.put_u16_le(self.chan6_raw);
25599        __tmp.put_u16_le(self.chan7_raw);
25600        __tmp.put_u16_le(self.chan8_raw);
25601        __tmp.put_u8(self.port);
25602        __tmp.put_u8(self.rssi);
25603        if matches!(version, MavlinkVersion::V2) {
25604            let len = __tmp.len();
25605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25606        } else {
25607            __tmp.len()
25608        }
25609    }
25610}
25611#[doc = "id: 34"]
25612#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25613#[derive(Debug, Clone, PartialEq)]
25614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25615#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25616pub struct RC_CHANNELS_SCALED_DATA {
25617    #[doc = "Timestamp (time since system boot)."]
25618    pub time_boot_ms: u32,
25619    #[doc = "RC channel 1 value scaled."]
25620    pub chan1_scaled: i16,
25621    #[doc = "RC channel 2 value scaled."]
25622    pub chan2_scaled: i16,
25623    #[doc = "RC channel 3 value scaled."]
25624    pub chan3_scaled: i16,
25625    #[doc = "RC channel 4 value scaled."]
25626    pub chan4_scaled: i16,
25627    #[doc = "RC channel 5 value scaled."]
25628    pub chan5_scaled: i16,
25629    #[doc = "RC channel 6 value scaled."]
25630    pub chan6_scaled: i16,
25631    #[doc = "RC channel 7 value scaled."]
25632    pub chan7_scaled: i16,
25633    #[doc = "RC channel 8 value scaled."]
25634    pub chan8_scaled: i16,
25635    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25636    pub port: u8,
25637    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25638    pub rssi: u8,
25639}
25640impl RC_CHANNELS_SCALED_DATA {
25641    pub const ENCODED_LEN: usize = 22usize;
25642    pub const DEFAULT: Self = Self {
25643        time_boot_ms: 0_u32,
25644        chan1_scaled: 0_i16,
25645        chan2_scaled: 0_i16,
25646        chan3_scaled: 0_i16,
25647        chan4_scaled: 0_i16,
25648        chan5_scaled: 0_i16,
25649        chan6_scaled: 0_i16,
25650        chan7_scaled: 0_i16,
25651        chan8_scaled: 0_i16,
25652        port: 0_u8,
25653        rssi: 0_u8,
25654    };
25655    #[cfg(feature = "arbitrary")]
25656    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25657        use arbitrary::{Arbitrary, Unstructured};
25658        let mut buf = [0u8; 1024];
25659        rng.fill_bytes(&mut buf);
25660        let mut unstructured = Unstructured::new(&buf);
25661        Self::arbitrary(&mut unstructured).unwrap_or_default()
25662    }
25663}
25664impl Default for RC_CHANNELS_SCALED_DATA {
25665    fn default() -> Self {
25666        Self::DEFAULT.clone()
25667    }
25668}
25669impl MessageData for RC_CHANNELS_SCALED_DATA {
25670    type Message = MavMessage;
25671    const ID: u32 = 34u32;
25672    const NAME: &'static str = "RC_CHANNELS_SCALED";
25673    const EXTRA_CRC: u8 = 237u8;
25674    const ENCODED_LEN: usize = 22usize;
25675    fn deser(
25676        _version: MavlinkVersion,
25677        __input: &[u8],
25678    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25679        let avail_len = __input.len();
25680        let mut payload_buf = [0; Self::ENCODED_LEN];
25681        let mut buf = if avail_len < Self::ENCODED_LEN {
25682            payload_buf[0..avail_len].copy_from_slice(__input);
25683            Bytes::new(&payload_buf)
25684        } else {
25685            Bytes::new(__input)
25686        };
25687        let mut __struct = Self::default();
25688        __struct.time_boot_ms = buf.get_u32_le();
25689        __struct.chan1_scaled = buf.get_i16_le();
25690        __struct.chan2_scaled = buf.get_i16_le();
25691        __struct.chan3_scaled = buf.get_i16_le();
25692        __struct.chan4_scaled = buf.get_i16_le();
25693        __struct.chan5_scaled = buf.get_i16_le();
25694        __struct.chan6_scaled = buf.get_i16_le();
25695        __struct.chan7_scaled = buf.get_i16_le();
25696        __struct.chan8_scaled = buf.get_i16_le();
25697        __struct.port = buf.get_u8();
25698        __struct.rssi = buf.get_u8();
25699        Ok(__struct)
25700    }
25701    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25702        let mut __tmp = BytesMut::new(bytes);
25703        #[allow(clippy::absurd_extreme_comparisons)]
25704        #[allow(unused_comparisons)]
25705        if __tmp.remaining() < Self::ENCODED_LEN {
25706            panic!(
25707                "buffer is too small (need {} bytes, but got {})",
25708                Self::ENCODED_LEN,
25709                __tmp.remaining(),
25710            )
25711        }
25712        __tmp.put_u32_le(self.time_boot_ms);
25713        __tmp.put_i16_le(self.chan1_scaled);
25714        __tmp.put_i16_le(self.chan2_scaled);
25715        __tmp.put_i16_le(self.chan3_scaled);
25716        __tmp.put_i16_le(self.chan4_scaled);
25717        __tmp.put_i16_le(self.chan5_scaled);
25718        __tmp.put_i16_le(self.chan6_scaled);
25719        __tmp.put_i16_le(self.chan7_scaled);
25720        __tmp.put_i16_le(self.chan8_scaled);
25721        __tmp.put_u8(self.port);
25722        __tmp.put_u8(self.rssi);
25723        if matches!(version, MavlinkVersion::V2) {
25724            let len = __tmp.len();
25725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25726        } else {
25727            __tmp.len()
25728        }
25729    }
25730}
25731#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25732#[doc = "id: 66"]
25733#[doc = "Request a data stream."]
25734#[derive(Debug, Clone, PartialEq)]
25735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25737pub struct REQUEST_DATA_STREAM_DATA {
25738    #[doc = "The requested message rate"]
25739    pub req_message_rate: u16,
25740    #[doc = "The target requested to send the message stream."]
25741    pub target_system: u8,
25742    #[doc = "The target requested to send the message stream."]
25743    pub target_component: u8,
25744    #[doc = "The ID of the requested data stream"]
25745    pub req_stream_id: u8,
25746    #[doc = "1 to start sending, 0 to stop sending."]
25747    pub start_stop: u8,
25748}
25749impl REQUEST_DATA_STREAM_DATA {
25750    pub const ENCODED_LEN: usize = 6usize;
25751    pub const DEFAULT: Self = Self {
25752        req_message_rate: 0_u16,
25753        target_system: 0_u8,
25754        target_component: 0_u8,
25755        req_stream_id: 0_u8,
25756        start_stop: 0_u8,
25757    };
25758    #[cfg(feature = "arbitrary")]
25759    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25760        use arbitrary::{Arbitrary, Unstructured};
25761        let mut buf = [0u8; 1024];
25762        rng.fill_bytes(&mut buf);
25763        let mut unstructured = Unstructured::new(&buf);
25764        Self::arbitrary(&mut unstructured).unwrap_or_default()
25765    }
25766}
25767impl Default for REQUEST_DATA_STREAM_DATA {
25768    fn default() -> Self {
25769        Self::DEFAULT.clone()
25770    }
25771}
25772impl MessageData for REQUEST_DATA_STREAM_DATA {
25773    type Message = MavMessage;
25774    const ID: u32 = 66u32;
25775    const NAME: &'static str = "REQUEST_DATA_STREAM";
25776    const EXTRA_CRC: u8 = 148u8;
25777    const ENCODED_LEN: usize = 6usize;
25778    fn deser(
25779        _version: MavlinkVersion,
25780        __input: &[u8],
25781    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25782        let avail_len = __input.len();
25783        let mut payload_buf = [0; Self::ENCODED_LEN];
25784        let mut buf = if avail_len < Self::ENCODED_LEN {
25785            payload_buf[0..avail_len].copy_from_slice(__input);
25786            Bytes::new(&payload_buf)
25787        } else {
25788            Bytes::new(__input)
25789        };
25790        let mut __struct = Self::default();
25791        __struct.req_message_rate = buf.get_u16_le();
25792        __struct.target_system = buf.get_u8();
25793        __struct.target_component = buf.get_u8();
25794        __struct.req_stream_id = buf.get_u8();
25795        __struct.start_stop = buf.get_u8();
25796        Ok(__struct)
25797    }
25798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25799        let mut __tmp = BytesMut::new(bytes);
25800        #[allow(clippy::absurd_extreme_comparisons)]
25801        #[allow(unused_comparisons)]
25802        if __tmp.remaining() < Self::ENCODED_LEN {
25803            panic!(
25804                "buffer is too small (need {} bytes, but got {})",
25805                Self::ENCODED_LEN,
25806                __tmp.remaining(),
25807            )
25808        }
25809        __tmp.put_u16_le(self.req_message_rate);
25810        __tmp.put_u8(self.target_system);
25811        __tmp.put_u8(self.target_component);
25812        __tmp.put_u8(self.req_stream_id);
25813        __tmp.put_u8(self.start_stop);
25814        if matches!(version, MavlinkVersion::V2) {
25815            let len = __tmp.len();
25816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25817        } else {
25818            __tmp.len()
25819        }
25820    }
25821}
25822#[doc = "id: 412"]
25823#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25824#[derive(Debug, Clone, PartialEq)]
25825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25827pub struct REQUEST_EVENT_DATA {
25828    #[doc = "First sequence number of the requested event."]
25829    pub first_sequence: u16,
25830    #[doc = "Last sequence number of the requested event."]
25831    pub last_sequence: u16,
25832    #[doc = "System ID"]
25833    pub target_system: u8,
25834    #[doc = "Component ID"]
25835    pub target_component: u8,
25836}
25837impl REQUEST_EVENT_DATA {
25838    pub const ENCODED_LEN: usize = 6usize;
25839    pub const DEFAULT: Self = Self {
25840        first_sequence: 0_u16,
25841        last_sequence: 0_u16,
25842        target_system: 0_u8,
25843        target_component: 0_u8,
25844    };
25845    #[cfg(feature = "arbitrary")]
25846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25847        use arbitrary::{Arbitrary, Unstructured};
25848        let mut buf = [0u8; 1024];
25849        rng.fill_bytes(&mut buf);
25850        let mut unstructured = Unstructured::new(&buf);
25851        Self::arbitrary(&mut unstructured).unwrap_or_default()
25852    }
25853}
25854impl Default for REQUEST_EVENT_DATA {
25855    fn default() -> Self {
25856        Self::DEFAULT.clone()
25857    }
25858}
25859impl MessageData for REQUEST_EVENT_DATA {
25860    type Message = MavMessage;
25861    const ID: u32 = 412u32;
25862    const NAME: &'static str = "REQUEST_EVENT";
25863    const EXTRA_CRC: u8 = 33u8;
25864    const ENCODED_LEN: usize = 6usize;
25865    fn deser(
25866        _version: MavlinkVersion,
25867        __input: &[u8],
25868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25869        let avail_len = __input.len();
25870        let mut payload_buf = [0; Self::ENCODED_LEN];
25871        let mut buf = if avail_len < Self::ENCODED_LEN {
25872            payload_buf[0..avail_len].copy_from_slice(__input);
25873            Bytes::new(&payload_buf)
25874        } else {
25875            Bytes::new(__input)
25876        };
25877        let mut __struct = Self::default();
25878        __struct.first_sequence = buf.get_u16_le();
25879        __struct.last_sequence = buf.get_u16_le();
25880        __struct.target_system = buf.get_u8();
25881        __struct.target_component = buf.get_u8();
25882        Ok(__struct)
25883    }
25884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25885        let mut __tmp = BytesMut::new(bytes);
25886        #[allow(clippy::absurd_extreme_comparisons)]
25887        #[allow(unused_comparisons)]
25888        if __tmp.remaining() < Self::ENCODED_LEN {
25889            panic!(
25890                "buffer is too small (need {} bytes, but got {})",
25891                Self::ENCODED_LEN,
25892                __tmp.remaining(),
25893            )
25894        }
25895        __tmp.put_u16_le(self.first_sequence);
25896        __tmp.put_u16_le(self.last_sequence);
25897        __tmp.put_u8(self.target_system);
25898        __tmp.put_u8(self.target_component);
25899        if matches!(version, MavlinkVersion::V2) {
25900            let len = __tmp.len();
25901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25902        } else {
25903            __tmp.len()
25904        }
25905    }
25906}
25907#[doc = "id: 142"]
25908#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25909#[derive(Debug, Clone, PartialEq)]
25910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25912pub struct RESOURCE_REQUEST_DATA {
25913    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25914    pub request_id: u8,
25915    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25916    pub uri_type: u8,
25917    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25919    pub uri: [u8; 120],
25920    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25921    pub transfer_type: u8,
25922    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25923    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25924    pub storage: [u8; 120],
25925}
25926impl RESOURCE_REQUEST_DATA {
25927    pub const ENCODED_LEN: usize = 243usize;
25928    pub const DEFAULT: Self = Self {
25929        request_id: 0_u8,
25930        uri_type: 0_u8,
25931        uri: [0_u8; 120usize],
25932        transfer_type: 0_u8,
25933        storage: [0_u8; 120usize],
25934    };
25935    #[cfg(feature = "arbitrary")]
25936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25937        use arbitrary::{Arbitrary, Unstructured};
25938        let mut buf = [0u8; 1024];
25939        rng.fill_bytes(&mut buf);
25940        let mut unstructured = Unstructured::new(&buf);
25941        Self::arbitrary(&mut unstructured).unwrap_or_default()
25942    }
25943}
25944impl Default for RESOURCE_REQUEST_DATA {
25945    fn default() -> Self {
25946        Self::DEFAULT.clone()
25947    }
25948}
25949impl MessageData for RESOURCE_REQUEST_DATA {
25950    type Message = MavMessage;
25951    const ID: u32 = 142u32;
25952    const NAME: &'static str = "RESOURCE_REQUEST";
25953    const EXTRA_CRC: u8 = 72u8;
25954    const ENCODED_LEN: usize = 243usize;
25955    fn deser(
25956        _version: MavlinkVersion,
25957        __input: &[u8],
25958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25959        let avail_len = __input.len();
25960        let mut payload_buf = [0; Self::ENCODED_LEN];
25961        let mut buf = if avail_len < Self::ENCODED_LEN {
25962            payload_buf[0..avail_len].copy_from_slice(__input);
25963            Bytes::new(&payload_buf)
25964        } else {
25965            Bytes::new(__input)
25966        };
25967        let mut __struct = Self::default();
25968        __struct.request_id = buf.get_u8();
25969        __struct.uri_type = buf.get_u8();
25970        for v in &mut __struct.uri {
25971            let val = buf.get_u8();
25972            *v = val;
25973        }
25974        __struct.transfer_type = buf.get_u8();
25975        for v in &mut __struct.storage {
25976            let val = buf.get_u8();
25977            *v = val;
25978        }
25979        Ok(__struct)
25980    }
25981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25982        let mut __tmp = BytesMut::new(bytes);
25983        #[allow(clippy::absurd_extreme_comparisons)]
25984        #[allow(unused_comparisons)]
25985        if __tmp.remaining() < Self::ENCODED_LEN {
25986            panic!(
25987                "buffer is too small (need {} bytes, but got {})",
25988                Self::ENCODED_LEN,
25989                __tmp.remaining(),
25990            )
25991        }
25992        __tmp.put_u8(self.request_id);
25993        __tmp.put_u8(self.uri_type);
25994        for val in &self.uri {
25995            __tmp.put_u8(*val);
25996        }
25997        __tmp.put_u8(self.transfer_type);
25998        for val in &self.storage {
25999            __tmp.put_u8(*val);
26000        }
26001        if matches!(version, MavlinkVersion::V2) {
26002            let len = __tmp.len();
26003            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26004        } else {
26005            __tmp.len()
26006        }
26007    }
26008}
26009#[doc = "id: 413"]
26010#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26011#[derive(Debug, Clone, PartialEq)]
26012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26014pub struct RESPONSE_EVENT_ERROR_DATA {
26015    #[doc = "Sequence number."]
26016    pub sequence: u16,
26017    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26018    pub sequence_oldest_available: u16,
26019    #[doc = "System ID"]
26020    pub target_system: u8,
26021    #[doc = "Component ID"]
26022    pub target_component: u8,
26023    #[doc = "Error reason."]
26024    pub reason: MavEventErrorReason,
26025}
26026impl RESPONSE_EVENT_ERROR_DATA {
26027    pub const ENCODED_LEN: usize = 7usize;
26028    pub const DEFAULT: Self = Self {
26029        sequence: 0_u16,
26030        sequence_oldest_available: 0_u16,
26031        target_system: 0_u8,
26032        target_component: 0_u8,
26033        reason: MavEventErrorReason::DEFAULT,
26034    };
26035    #[cfg(feature = "arbitrary")]
26036    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26037        use arbitrary::{Arbitrary, Unstructured};
26038        let mut buf = [0u8; 1024];
26039        rng.fill_bytes(&mut buf);
26040        let mut unstructured = Unstructured::new(&buf);
26041        Self::arbitrary(&mut unstructured).unwrap_or_default()
26042    }
26043}
26044impl Default for RESPONSE_EVENT_ERROR_DATA {
26045    fn default() -> Self {
26046        Self::DEFAULT.clone()
26047    }
26048}
26049impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26050    type Message = MavMessage;
26051    const ID: u32 = 413u32;
26052    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26053    const EXTRA_CRC: u8 = 77u8;
26054    const ENCODED_LEN: usize = 7usize;
26055    fn deser(
26056        _version: MavlinkVersion,
26057        __input: &[u8],
26058    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26059        let avail_len = __input.len();
26060        let mut payload_buf = [0; Self::ENCODED_LEN];
26061        let mut buf = if avail_len < Self::ENCODED_LEN {
26062            payload_buf[0..avail_len].copy_from_slice(__input);
26063            Bytes::new(&payload_buf)
26064        } else {
26065            Bytes::new(__input)
26066        };
26067        let mut __struct = Self::default();
26068        __struct.sequence = buf.get_u16_le();
26069        __struct.sequence_oldest_available = buf.get_u16_le();
26070        __struct.target_system = buf.get_u8();
26071        __struct.target_component = buf.get_u8();
26072        let tmp = buf.get_u8();
26073        __struct.reason =
26074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26075                enum_type: "MavEventErrorReason",
26076                value: tmp as u32,
26077            })?;
26078        Ok(__struct)
26079    }
26080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26081        let mut __tmp = BytesMut::new(bytes);
26082        #[allow(clippy::absurd_extreme_comparisons)]
26083        #[allow(unused_comparisons)]
26084        if __tmp.remaining() < Self::ENCODED_LEN {
26085            panic!(
26086                "buffer is too small (need {} bytes, but got {})",
26087                Self::ENCODED_LEN,
26088                __tmp.remaining(),
26089            )
26090        }
26091        __tmp.put_u16_le(self.sequence);
26092        __tmp.put_u16_le(self.sequence_oldest_available);
26093        __tmp.put_u8(self.target_system);
26094        __tmp.put_u8(self.target_component);
26095        __tmp.put_u8(self.reason as u8);
26096        if matches!(version, MavlinkVersion::V2) {
26097            let len = __tmp.len();
26098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26099        } else {
26100            __tmp.len()
26101        }
26102    }
26103}
26104#[doc = "id: 55"]
26105#[doc = "Read out the safety zone the MAV currently assumes."]
26106#[derive(Debug, Clone, PartialEq)]
26107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26109pub struct SAFETY_ALLOWED_AREA_DATA {
26110    #[doc = "x position 1 / Latitude 1"]
26111    pub p1x: f32,
26112    #[doc = "y position 1 / Longitude 1"]
26113    pub p1y: f32,
26114    #[doc = "z position 1 / Altitude 1"]
26115    pub p1z: f32,
26116    #[doc = "x position 2 / Latitude 2"]
26117    pub p2x: f32,
26118    #[doc = "y position 2 / Longitude 2"]
26119    pub p2y: f32,
26120    #[doc = "z position 2 / Altitude 2"]
26121    pub p2z: f32,
26122    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26123    pub frame: MavFrame,
26124}
26125impl SAFETY_ALLOWED_AREA_DATA {
26126    pub const ENCODED_LEN: usize = 25usize;
26127    pub const DEFAULT: Self = Self {
26128        p1x: 0.0_f32,
26129        p1y: 0.0_f32,
26130        p1z: 0.0_f32,
26131        p2x: 0.0_f32,
26132        p2y: 0.0_f32,
26133        p2z: 0.0_f32,
26134        frame: MavFrame::DEFAULT,
26135    };
26136    #[cfg(feature = "arbitrary")]
26137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26138        use arbitrary::{Arbitrary, Unstructured};
26139        let mut buf = [0u8; 1024];
26140        rng.fill_bytes(&mut buf);
26141        let mut unstructured = Unstructured::new(&buf);
26142        Self::arbitrary(&mut unstructured).unwrap_or_default()
26143    }
26144}
26145impl Default for SAFETY_ALLOWED_AREA_DATA {
26146    fn default() -> Self {
26147        Self::DEFAULT.clone()
26148    }
26149}
26150impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26151    type Message = MavMessage;
26152    const ID: u32 = 55u32;
26153    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26154    const EXTRA_CRC: u8 = 3u8;
26155    const ENCODED_LEN: usize = 25usize;
26156    fn deser(
26157        _version: MavlinkVersion,
26158        __input: &[u8],
26159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26160        let avail_len = __input.len();
26161        let mut payload_buf = [0; Self::ENCODED_LEN];
26162        let mut buf = if avail_len < Self::ENCODED_LEN {
26163            payload_buf[0..avail_len].copy_from_slice(__input);
26164            Bytes::new(&payload_buf)
26165        } else {
26166            Bytes::new(__input)
26167        };
26168        let mut __struct = Self::default();
26169        __struct.p1x = buf.get_f32_le();
26170        __struct.p1y = buf.get_f32_le();
26171        __struct.p1z = buf.get_f32_le();
26172        __struct.p2x = buf.get_f32_le();
26173        __struct.p2y = buf.get_f32_le();
26174        __struct.p2z = buf.get_f32_le();
26175        let tmp = buf.get_u8();
26176        __struct.frame =
26177            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26178                enum_type: "MavFrame",
26179                value: tmp as u32,
26180            })?;
26181        Ok(__struct)
26182    }
26183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26184        let mut __tmp = BytesMut::new(bytes);
26185        #[allow(clippy::absurd_extreme_comparisons)]
26186        #[allow(unused_comparisons)]
26187        if __tmp.remaining() < Self::ENCODED_LEN {
26188            panic!(
26189                "buffer is too small (need {} bytes, but got {})",
26190                Self::ENCODED_LEN,
26191                __tmp.remaining(),
26192            )
26193        }
26194        __tmp.put_f32_le(self.p1x);
26195        __tmp.put_f32_le(self.p1y);
26196        __tmp.put_f32_le(self.p1z);
26197        __tmp.put_f32_le(self.p2x);
26198        __tmp.put_f32_le(self.p2y);
26199        __tmp.put_f32_le(self.p2z);
26200        __tmp.put_u8(self.frame as u8);
26201        if matches!(version, MavlinkVersion::V2) {
26202            let len = __tmp.len();
26203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26204        } else {
26205            __tmp.len()
26206        }
26207    }
26208}
26209#[doc = "id: 54"]
26210#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26211#[derive(Debug, Clone, PartialEq)]
26212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26214pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26215    #[doc = "x position 1 / Latitude 1"]
26216    pub p1x: f32,
26217    #[doc = "y position 1 / Longitude 1"]
26218    pub p1y: f32,
26219    #[doc = "z position 1 / Altitude 1"]
26220    pub p1z: f32,
26221    #[doc = "x position 2 / Latitude 2"]
26222    pub p2x: f32,
26223    #[doc = "y position 2 / Longitude 2"]
26224    pub p2y: f32,
26225    #[doc = "z position 2 / Altitude 2"]
26226    pub p2z: f32,
26227    #[doc = "System ID"]
26228    pub target_system: u8,
26229    #[doc = "Component ID"]
26230    pub target_component: u8,
26231    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26232    pub frame: MavFrame,
26233}
26234impl SAFETY_SET_ALLOWED_AREA_DATA {
26235    pub const ENCODED_LEN: usize = 27usize;
26236    pub const DEFAULT: Self = Self {
26237        p1x: 0.0_f32,
26238        p1y: 0.0_f32,
26239        p1z: 0.0_f32,
26240        p2x: 0.0_f32,
26241        p2y: 0.0_f32,
26242        p2z: 0.0_f32,
26243        target_system: 0_u8,
26244        target_component: 0_u8,
26245        frame: MavFrame::DEFAULT,
26246    };
26247    #[cfg(feature = "arbitrary")]
26248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26249        use arbitrary::{Arbitrary, Unstructured};
26250        let mut buf = [0u8; 1024];
26251        rng.fill_bytes(&mut buf);
26252        let mut unstructured = Unstructured::new(&buf);
26253        Self::arbitrary(&mut unstructured).unwrap_or_default()
26254    }
26255}
26256impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26257    fn default() -> Self {
26258        Self::DEFAULT.clone()
26259    }
26260}
26261impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26262    type Message = MavMessage;
26263    const ID: u32 = 54u32;
26264    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26265    const EXTRA_CRC: u8 = 15u8;
26266    const ENCODED_LEN: usize = 27usize;
26267    fn deser(
26268        _version: MavlinkVersion,
26269        __input: &[u8],
26270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26271        let avail_len = __input.len();
26272        let mut payload_buf = [0; Self::ENCODED_LEN];
26273        let mut buf = if avail_len < Self::ENCODED_LEN {
26274            payload_buf[0..avail_len].copy_from_slice(__input);
26275            Bytes::new(&payload_buf)
26276        } else {
26277            Bytes::new(__input)
26278        };
26279        let mut __struct = Self::default();
26280        __struct.p1x = buf.get_f32_le();
26281        __struct.p1y = buf.get_f32_le();
26282        __struct.p1z = buf.get_f32_le();
26283        __struct.p2x = buf.get_f32_le();
26284        __struct.p2y = buf.get_f32_le();
26285        __struct.p2z = buf.get_f32_le();
26286        __struct.target_system = buf.get_u8();
26287        __struct.target_component = buf.get_u8();
26288        let tmp = buf.get_u8();
26289        __struct.frame =
26290            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26291                enum_type: "MavFrame",
26292                value: tmp as u32,
26293            })?;
26294        Ok(__struct)
26295    }
26296    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26297        let mut __tmp = BytesMut::new(bytes);
26298        #[allow(clippy::absurd_extreme_comparisons)]
26299        #[allow(unused_comparisons)]
26300        if __tmp.remaining() < Self::ENCODED_LEN {
26301            panic!(
26302                "buffer is too small (need {} bytes, but got {})",
26303                Self::ENCODED_LEN,
26304                __tmp.remaining(),
26305            )
26306        }
26307        __tmp.put_f32_le(self.p1x);
26308        __tmp.put_f32_le(self.p1y);
26309        __tmp.put_f32_le(self.p1z);
26310        __tmp.put_f32_le(self.p2x);
26311        __tmp.put_f32_le(self.p2y);
26312        __tmp.put_f32_le(self.p2z);
26313        __tmp.put_u8(self.target_system);
26314        __tmp.put_u8(self.target_component);
26315        __tmp.put_u8(self.frame as u8);
26316        if matches!(version, MavlinkVersion::V2) {
26317            let len = __tmp.len();
26318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26319        } else {
26320            __tmp.len()
26321        }
26322    }
26323}
26324#[doc = "id: 26"]
26325#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26326#[derive(Debug, Clone, PartialEq)]
26327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26329pub struct SCALED_IMU_DATA {
26330    #[doc = "Timestamp (time since system boot)."]
26331    pub time_boot_ms: u32,
26332    #[doc = "X acceleration"]
26333    pub xacc: i16,
26334    #[doc = "Y acceleration"]
26335    pub yacc: i16,
26336    #[doc = "Z acceleration"]
26337    pub zacc: i16,
26338    #[doc = "Angular speed around X axis"]
26339    pub xgyro: i16,
26340    #[doc = "Angular speed around Y axis"]
26341    pub ygyro: i16,
26342    #[doc = "Angular speed around Z axis"]
26343    pub zgyro: i16,
26344    #[doc = "X Magnetic field"]
26345    pub xmag: i16,
26346    #[doc = "Y Magnetic field"]
26347    pub ymag: i16,
26348    #[doc = "Z Magnetic field"]
26349    pub zmag: i16,
26350    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26351    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26352    pub temperature: i16,
26353}
26354impl SCALED_IMU_DATA {
26355    pub const ENCODED_LEN: usize = 24usize;
26356    pub const DEFAULT: Self = Self {
26357        time_boot_ms: 0_u32,
26358        xacc: 0_i16,
26359        yacc: 0_i16,
26360        zacc: 0_i16,
26361        xgyro: 0_i16,
26362        ygyro: 0_i16,
26363        zgyro: 0_i16,
26364        xmag: 0_i16,
26365        ymag: 0_i16,
26366        zmag: 0_i16,
26367        temperature: 0_i16,
26368    };
26369    #[cfg(feature = "arbitrary")]
26370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26371        use arbitrary::{Arbitrary, Unstructured};
26372        let mut buf = [0u8; 1024];
26373        rng.fill_bytes(&mut buf);
26374        let mut unstructured = Unstructured::new(&buf);
26375        Self::arbitrary(&mut unstructured).unwrap_or_default()
26376    }
26377}
26378impl Default for SCALED_IMU_DATA {
26379    fn default() -> Self {
26380        Self::DEFAULT.clone()
26381    }
26382}
26383impl MessageData for SCALED_IMU_DATA {
26384    type Message = MavMessage;
26385    const ID: u32 = 26u32;
26386    const NAME: &'static str = "SCALED_IMU";
26387    const EXTRA_CRC: u8 = 170u8;
26388    const ENCODED_LEN: usize = 24usize;
26389    fn deser(
26390        _version: MavlinkVersion,
26391        __input: &[u8],
26392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26393        let avail_len = __input.len();
26394        let mut payload_buf = [0; Self::ENCODED_LEN];
26395        let mut buf = if avail_len < Self::ENCODED_LEN {
26396            payload_buf[0..avail_len].copy_from_slice(__input);
26397            Bytes::new(&payload_buf)
26398        } else {
26399            Bytes::new(__input)
26400        };
26401        let mut __struct = Self::default();
26402        __struct.time_boot_ms = buf.get_u32_le();
26403        __struct.xacc = buf.get_i16_le();
26404        __struct.yacc = buf.get_i16_le();
26405        __struct.zacc = buf.get_i16_le();
26406        __struct.xgyro = buf.get_i16_le();
26407        __struct.ygyro = buf.get_i16_le();
26408        __struct.zgyro = buf.get_i16_le();
26409        __struct.xmag = buf.get_i16_le();
26410        __struct.ymag = buf.get_i16_le();
26411        __struct.zmag = buf.get_i16_le();
26412        __struct.temperature = buf.get_i16_le();
26413        Ok(__struct)
26414    }
26415    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26416        let mut __tmp = BytesMut::new(bytes);
26417        #[allow(clippy::absurd_extreme_comparisons)]
26418        #[allow(unused_comparisons)]
26419        if __tmp.remaining() < Self::ENCODED_LEN {
26420            panic!(
26421                "buffer is too small (need {} bytes, but got {})",
26422                Self::ENCODED_LEN,
26423                __tmp.remaining(),
26424            )
26425        }
26426        __tmp.put_u32_le(self.time_boot_ms);
26427        __tmp.put_i16_le(self.xacc);
26428        __tmp.put_i16_le(self.yacc);
26429        __tmp.put_i16_le(self.zacc);
26430        __tmp.put_i16_le(self.xgyro);
26431        __tmp.put_i16_le(self.ygyro);
26432        __tmp.put_i16_le(self.zgyro);
26433        __tmp.put_i16_le(self.xmag);
26434        __tmp.put_i16_le(self.ymag);
26435        __tmp.put_i16_le(self.zmag);
26436        __tmp.put_i16_le(self.temperature);
26437        if matches!(version, MavlinkVersion::V2) {
26438            let len = __tmp.len();
26439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26440        } else {
26441            __tmp.len()
26442        }
26443    }
26444}
26445#[doc = "id: 116"]
26446#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26447#[derive(Debug, Clone, PartialEq)]
26448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26450pub struct SCALED_IMU2_DATA {
26451    #[doc = "Timestamp (time since system boot)."]
26452    pub time_boot_ms: u32,
26453    #[doc = "X acceleration"]
26454    pub xacc: i16,
26455    #[doc = "Y acceleration"]
26456    pub yacc: i16,
26457    #[doc = "Z acceleration"]
26458    pub zacc: i16,
26459    #[doc = "Angular speed around X axis"]
26460    pub xgyro: i16,
26461    #[doc = "Angular speed around Y axis"]
26462    pub ygyro: i16,
26463    #[doc = "Angular speed around Z axis"]
26464    pub zgyro: i16,
26465    #[doc = "X Magnetic field"]
26466    pub xmag: i16,
26467    #[doc = "Y Magnetic field"]
26468    pub ymag: i16,
26469    #[doc = "Z Magnetic field"]
26470    pub zmag: i16,
26471    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26472    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26473    pub temperature: i16,
26474}
26475impl SCALED_IMU2_DATA {
26476    pub const ENCODED_LEN: usize = 24usize;
26477    pub const DEFAULT: Self = Self {
26478        time_boot_ms: 0_u32,
26479        xacc: 0_i16,
26480        yacc: 0_i16,
26481        zacc: 0_i16,
26482        xgyro: 0_i16,
26483        ygyro: 0_i16,
26484        zgyro: 0_i16,
26485        xmag: 0_i16,
26486        ymag: 0_i16,
26487        zmag: 0_i16,
26488        temperature: 0_i16,
26489    };
26490    #[cfg(feature = "arbitrary")]
26491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26492        use arbitrary::{Arbitrary, Unstructured};
26493        let mut buf = [0u8; 1024];
26494        rng.fill_bytes(&mut buf);
26495        let mut unstructured = Unstructured::new(&buf);
26496        Self::arbitrary(&mut unstructured).unwrap_or_default()
26497    }
26498}
26499impl Default for SCALED_IMU2_DATA {
26500    fn default() -> Self {
26501        Self::DEFAULT.clone()
26502    }
26503}
26504impl MessageData for SCALED_IMU2_DATA {
26505    type Message = MavMessage;
26506    const ID: u32 = 116u32;
26507    const NAME: &'static str = "SCALED_IMU2";
26508    const EXTRA_CRC: u8 = 76u8;
26509    const ENCODED_LEN: usize = 24usize;
26510    fn deser(
26511        _version: MavlinkVersion,
26512        __input: &[u8],
26513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26514        let avail_len = __input.len();
26515        let mut payload_buf = [0; Self::ENCODED_LEN];
26516        let mut buf = if avail_len < Self::ENCODED_LEN {
26517            payload_buf[0..avail_len].copy_from_slice(__input);
26518            Bytes::new(&payload_buf)
26519        } else {
26520            Bytes::new(__input)
26521        };
26522        let mut __struct = Self::default();
26523        __struct.time_boot_ms = buf.get_u32_le();
26524        __struct.xacc = buf.get_i16_le();
26525        __struct.yacc = buf.get_i16_le();
26526        __struct.zacc = buf.get_i16_le();
26527        __struct.xgyro = buf.get_i16_le();
26528        __struct.ygyro = buf.get_i16_le();
26529        __struct.zgyro = buf.get_i16_le();
26530        __struct.xmag = buf.get_i16_le();
26531        __struct.ymag = buf.get_i16_le();
26532        __struct.zmag = buf.get_i16_le();
26533        __struct.temperature = buf.get_i16_le();
26534        Ok(__struct)
26535    }
26536    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26537        let mut __tmp = BytesMut::new(bytes);
26538        #[allow(clippy::absurd_extreme_comparisons)]
26539        #[allow(unused_comparisons)]
26540        if __tmp.remaining() < Self::ENCODED_LEN {
26541            panic!(
26542                "buffer is too small (need {} bytes, but got {})",
26543                Self::ENCODED_LEN,
26544                __tmp.remaining(),
26545            )
26546        }
26547        __tmp.put_u32_le(self.time_boot_ms);
26548        __tmp.put_i16_le(self.xacc);
26549        __tmp.put_i16_le(self.yacc);
26550        __tmp.put_i16_le(self.zacc);
26551        __tmp.put_i16_le(self.xgyro);
26552        __tmp.put_i16_le(self.ygyro);
26553        __tmp.put_i16_le(self.zgyro);
26554        __tmp.put_i16_le(self.xmag);
26555        __tmp.put_i16_le(self.ymag);
26556        __tmp.put_i16_le(self.zmag);
26557        __tmp.put_i16_le(self.temperature);
26558        if matches!(version, MavlinkVersion::V2) {
26559            let len = __tmp.len();
26560            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26561        } else {
26562            __tmp.len()
26563        }
26564    }
26565}
26566#[doc = "id: 129"]
26567#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26568#[derive(Debug, Clone, PartialEq)]
26569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26571pub struct SCALED_IMU3_DATA {
26572    #[doc = "Timestamp (time since system boot)."]
26573    pub time_boot_ms: u32,
26574    #[doc = "X acceleration"]
26575    pub xacc: i16,
26576    #[doc = "Y acceleration"]
26577    pub yacc: i16,
26578    #[doc = "Z acceleration"]
26579    pub zacc: i16,
26580    #[doc = "Angular speed around X axis"]
26581    pub xgyro: i16,
26582    #[doc = "Angular speed around Y axis"]
26583    pub ygyro: i16,
26584    #[doc = "Angular speed around Z axis"]
26585    pub zgyro: i16,
26586    #[doc = "X Magnetic field"]
26587    pub xmag: i16,
26588    #[doc = "Y Magnetic field"]
26589    pub ymag: i16,
26590    #[doc = "Z Magnetic field"]
26591    pub zmag: i16,
26592    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26594    pub temperature: i16,
26595}
26596impl SCALED_IMU3_DATA {
26597    pub const ENCODED_LEN: usize = 24usize;
26598    pub const DEFAULT: Self = Self {
26599        time_boot_ms: 0_u32,
26600        xacc: 0_i16,
26601        yacc: 0_i16,
26602        zacc: 0_i16,
26603        xgyro: 0_i16,
26604        ygyro: 0_i16,
26605        zgyro: 0_i16,
26606        xmag: 0_i16,
26607        ymag: 0_i16,
26608        zmag: 0_i16,
26609        temperature: 0_i16,
26610    };
26611    #[cfg(feature = "arbitrary")]
26612    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26613        use arbitrary::{Arbitrary, Unstructured};
26614        let mut buf = [0u8; 1024];
26615        rng.fill_bytes(&mut buf);
26616        let mut unstructured = Unstructured::new(&buf);
26617        Self::arbitrary(&mut unstructured).unwrap_or_default()
26618    }
26619}
26620impl Default for SCALED_IMU3_DATA {
26621    fn default() -> Self {
26622        Self::DEFAULT.clone()
26623    }
26624}
26625impl MessageData for SCALED_IMU3_DATA {
26626    type Message = MavMessage;
26627    const ID: u32 = 129u32;
26628    const NAME: &'static str = "SCALED_IMU3";
26629    const EXTRA_CRC: u8 = 46u8;
26630    const ENCODED_LEN: usize = 24usize;
26631    fn deser(
26632        _version: MavlinkVersion,
26633        __input: &[u8],
26634    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26635        let avail_len = __input.len();
26636        let mut payload_buf = [0; Self::ENCODED_LEN];
26637        let mut buf = if avail_len < Self::ENCODED_LEN {
26638            payload_buf[0..avail_len].copy_from_slice(__input);
26639            Bytes::new(&payload_buf)
26640        } else {
26641            Bytes::new(__input)
26642        };
26643        let mut __struct = Self::default();
26644        __struct.time_boot_ms = buf.get_u32_le();
26645        __struct.xacc = buf.get_i16_le();
26646        __struct.yacc = buf.get_i16_le();
26647        __struct.zacc = buf.get_i16_le();
26648        __struct.xgyro = buf.get_i16_le();
26649        __struct.ygyro = buf.get_i16_le();
26650        __struct.zgyro = buf.get_i16_le();
26651        __struct.xmag = buf.get_i16_le();
26652        __struct.ymag = buf.get_i16_le();
26653        __struct.zmag = buf.get_i16_le();
26654        __struct.temperature = buf.get_i16_le();
26655        Ok(__struct)
26656    }
26657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26658        let mut __tmp = BytesMut::new(bytes);
26659        #[allow(clippy::absurd_extreme_comparisons)]
26660        #[allow(unused_comparisons)]
26661        if __tmp.remaining() < Self::ENCODED_LEN {
26662            panic!(
26663                "buffer is too small (need {} bytes, but got {})",
26664                Self::ENCODED_LEN,
26665                __tmp.remaining(),
26666            )
26667        }
26668        __tmp.put_u32_le(self.time_boot_ms);
26669        __tmp.put_i16_le(self.xacc);
26670        __tmp.put_i16_le(self.yacc);
26671        __tmp.put_i16_le(self.zacc);
26672        __tmp.put_i16_le(self.xgyro);
26673        __tmp.put_i16_le(self.ygyro);
26674        __tmp.put_i16_le(self.zgyro);
26675        __tmp.put_i16_le(self.xmag);
26676        __tmp.put_i16_le(self.ymag);
26677        __tmp.put_i16_le(self.zmag);
26678        __tmp.put_i16_le(self.temperature);
26679        if matches!(version, MavlinkVersion::V2) {
26680            let len = __tmp.len();
26681            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26682        } else {
26683            __tmp.len()
26684        }
26685    }
26686}
26687#[doc = "id: 29"]
26688#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26689#[derive(Debug, Clone, PartialEq)]
26690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26692pub struct SCALED_PRESSURE_DATA {
26693    #[doc = "Timestamp (time since system boot)."]
26694    pub time_boot_ms: u32,
26695    #[doc = "Absolute pressure"]
26696    pub press_abs: f32,
26697    #[doc = "Differential pressure 1"]
26698    pub press_diff: f32,
26699    #[doc = "Absolute pressure temperature"]
26700    pub temperature: i16,
26701    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26702    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26703    pub temperature_press_diff: i16,
26704}
26705impl SCALED_PRESSURE_DATA {
26706    pub const ENCODED_LEN: usize = 16usize;
26707    pub const DEFAULT: Self = Self {
26708        time_boot_ms: 0_u32,
26709        press_abs: 0.0_f32,
26710        press_diff: 0.0_f32,
26711        temperature: 0_i16,
26712        temperature_press_diff: 0_i16,
26713    };
26714    #[cfg(feature = "arbitrary")]
26715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26716        use arbitrary::{Arbitrary, Unstructured};
26717        let mut buf = [0u8; 1024];
26718        rng.fill_bytes(&mut buf);
26719        let mut unstructured = Unstructured::new(&buf);
26720        Self::arbitrary(&mut unstructured).unwrap_or_default()
26721    }
26722}
26723impl Default for SCALED_PRESSURE_DATA {
26724    fn default() -> Self {
26725        Self::DEFAULT.clone()
26726    }
26727}
26728impl MessageData for SCALED_PRESSURE_DATA {
26729    type Message = MavMessage;
26730    const ID: u32 = 29u32;
26731    const NAME: &'static str = "SCALED_PRESSURE";
26732    const EXTRA_CRC: u8 = 115u8;
26733    const ENCODED_LEN: usize = 16usize;
26734    fn deser(
26735        _version: MavlinkVersion,
26736        __input: &[u8],
26737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26738        let avail_len = __input.len();
26739        let mut payload_buf = [0; Self::ENCODED_LEN];
26740        let mut buf = if avail_len < Self::ENCODED_LEN {
26741            payload_buf[0..avail_len].copy_from_slice(__input);
26742            Bytes::new(&payload_buf)
26743        } else {
26744            Bytes::new(__input)
26745        };
26746        let mut __struct = Self::default();
26747        __struct.time_boot_ms = buf.get_u32_le();
26748        __struct.press_abs = buf.get_f32_le();
26749        __struct.press_diff = buf.get_f32_le();
26750        __struct.temperature = buf.get_i16_le();
26751        __struct.temperature_press_diff = buf.get_i16_le();
26752        Ok(__struct)
26753    }
26754    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26755        let mut __tmp = BytesMut::new(bytes);
26756        #[allow(clippy::absurd_extreme_comparisons)]
26757        #[allow(unused_comparisons)]
26758        if __tmp.remaining() < Self::ENCODED_LEN {
26759            panic!(
26760                "buffer is too small (need {} bytes, but got {})",
26761                Self::ENCODED_LEN,
26762                __tmp.remaining(),
26763            )
26764        }
26765        __tmp.put_u32_le(self.time_boot_ms);
26766        __tmp.put_f32_le(self.press_abs);
26767        __tmp.put_f32_le(self.press_diff);
26768        __tmp.put_i16_le(self.temperature);
26769        __tmp.put_i16_le(self.temperature_press_diff);
26770        if matches!(version, MavlinkVersion::V2) {
26771            let len = __tmp.len();
26772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26773        } else {
26774            __tmp.len()
26775        }
26776    }
26777}
26778#[doc = "id: 137"]
26779#[doc = "Barometer readings for 2nd barometer."]
26780#[derive(Debug, Clone, PartialEq)]
26781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26783pub struct SCALED_PRESSURE2_DATA {
26784    #[doc = "Timestamp (time since system boot)."]
26785    pub time_boot_ms: u32,
26786    #[doc = "Absolute pressure"]
26787    pub press_abs: f32,
26788    #[doc = "Differential pressure"]
26789    pub press_diff: f32,
26790    #[doc = "Absolute pressure temperature"]
26791    pub temperature: i16,
26792    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26794    pub temperature_press_diff: i16,
26795}
26796impl SCALED_PRESSURE2_DATA {
26797    pub const ENCODED_LEN: usize = 16usize;
26798    pub const DEFAULT: Self = Self {
26799        time_boot_ms: 0_u32,
26800        press_abs: 0.0_f32,
26801        press_diff: 0.0_f32,
26802        temperature: 0_i16,
26803        temperature_press_diff: 0_i16,
26804    };
26805    #[cfg(feature = "arbitrary")]
26806    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26807        use arbitrary::{Arbitrary, Unstructured};
26808        let mut buf = [0u8; 1024];
26809        rng.fill_bytes(&mut buf);
26810        let mut unstructured = Unstructured::new(&buf);
26811        Self::arbitrary(&mut unstructured).unwrap_or_default()
26812    }
26813}
26814impl Default for SCALED_PRESSURE2_DATA {
26815    fn default() -> Self {
26816        Self::DEFAULT.clone()
26817    }
26818}
26819impl MessageData for SCALED_PRESSURE2_DATA {
26820    type Message = MavMessage;
26821    const ID: u32 = 137u32;
26822    const NAME: &'static str = "SCALED_PRESSURE2";
26823    const EXTRA_CRC: u8 = 195u8;
26824    const ENCODED_LEN: usize = 16usize;
26825    fn deser(
26826        _version: MavlinkVersion,
26827        __input: &[u8],
26828    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26829        let avail_len = __input.len();
26830        let mut payload_buf = [0; Self::ENCODED_LEN];
26831        let mut buf = if avail_len < Self::ENCODED_LEN {
26832            payload_buf[0..avail_len].copy_from_slice(__input);
26833            Bytes::new(&payload_buf)
26834        } else {
26835            Bytes::new(__input)
26836        };
26837        let mut __struct = Self::default();
26838        __struct.time_boot_ms = buf.get_u32_le();
26839        __struct.press_abs = buf.get_f32_le();
26840        __struct.press_diff = buf.get_f32_le();
26841        __struct.temperature = buf.get_i16_le();
26842        __struct.temperature_press_diff = buf.get_i16_le();
26843        Ok(__struct)
26844    }
26845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26846        let mut __tmp = BytesMut::new(bytes);
26847        #[allow(clippy::absurd_extreme_comparisons)]
26848        #[allow(unused_comparisons)]
26849        if __tmp.remaining() < Self::ENCODED_LEN {
26850            panic!(
26851                "buffer is too small (need {} bytes, but got {})",
26852                Self::ENCODED_LEN,
26853                __tmp.remaining(),
26854            )
26855        }
26856        __tmp.put_u32_le(self.time_boot_ms);
26857        __tmp.put_f32_le(self.press_abs);
26858        __tmp.put_f32_le(self.press_diff);
26859        __tmp.put_i16_le(self.temperature);
26860        __tmp.put_i16_le(self.temperature_press_diff);
26861        if matches!(version, MavlinkVersion::V2) {
26862            let len = __tmp.len();
26863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26864        } else {
26865            __tmp.len()
26866        }
26867    }
26868}
26869#[doc = "id: 143"]
26870#[doc = "Barometer readings for 3rd barometer."]
26871#[derive(Debug, Clone, PartialEq)]
26872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26874pub struct SCALED_PRESSURE3_DATA {
26875    #[doc = "Timestamp (time since system boot)."]
26876    pub time_boot_ms: u32,
26877    #[doc = "Absolute pressure"]
26878    pub press_abs: f32,
26879    #[doc = "Differential pressure"]
26880    pub press_diff: f32,
26881    #[doc = "Absolute pressure temperature"]
26882    pub temperature: i16,
26883    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26884    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26885    pub temperature_press_diff: i16,
26886}
26887impl SCALED_PRESSURE3_DATA {
26888    pub const ENCODED_LEN: usize = 16usize;
26889    pub const DEFAULT: Self = Self {
26890        time_boot_ms: 0_u32,
26891        press_abs: 0.0_f32,
26892        press_diff: 0.0_f32,
26893        temperature: 0_i16,
26894        temperature_press_diff: 0_i16,
26895    };
26896    #[cfg(feature = "arbitrary")]
26897    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26898        use arbitrary::{Arbitrary, Unstructured};
26899        let mut buf = [0u8; 1024];
26900        rng.fill_bytes(&mut buf);
26901        let mut unstructured = Unstructured::new(&buf);
26902        Self::arbitrary(&mut unstructured).unwrap_or_default()
26903    }
26904}
26905impl Default for SCALED_PRESSURE3_DATA {
26906    fn default() -> Self {
26907        Self::DEFAULT.clone()
26908    }
26909}
26910impl MessageData for SCALED_PRESSURE3_DATA {
26911    type Message = MavMessage;
26912    const ID: u32 = 143u32;
26913    const NAME: &'static str = "SCALED_PRESSURE3";
26914    const EXTRA_CRC: u8 = 131u8;
26915    const ENCODED_LEN: usize = 16usize;
26916    fn deser(
26917        _version: MavlinkVersion,
26918        __input: &[u8],
26919    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26920        let avail_len = __input.len();
26921        let mut payload_buf = [0; Self::ENCODED_LEN];
26922        let mut buf = if avail_len < Self::ENCODED_LEN {
26923            payload_buf[0..avail_len].copy_from_slice(__input);
26924            Bytes::new(&payload_buf)
26925        } else {
26926            Bytes::new(__input)
26927        };
26928        let mut __struct = Self::default();
26929        __struct.time_boot_ms = buf.get_u32_le();
26930        __struct.press_abs = buf.get_f32_le();
26931        __struct.press_diff = buf.get_f32_le();
26932        __struct.temperature = buf.get_i16_le();
26933        __struct.temperature_press_diff = buf.get_i16_le();
26934        Ok(__struct)
26935    }
26936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26937        let mut __tmp = BytesMut::new(bytes);
26938        #[allow(clippy::absurd_extreme_comparisons)]
26939        #[allow(unused_comparisons)]
26940        if __tmp.remaining() < Self::ENCODED_LEN {
26941            panic!(
26942                "buffer is too small (need {} bytes, but got {})",
26943                Self::ENCODED_LEN,
26944                __tmp.remaining(),
26945            )
26946        }
26947        __tmp.put_u32_le(self.time_boot_ms);
26948        __tmp.put_f32_le(self.press_abs);
26949        __tmp.put_f32_le(self.press_diff);
26950        __tmp.put_i16_le(self.temperature);
26951        __tmp.put_i16_le(self.temperature_press_diff);
26952        if matches!(version, MavlinkVersion::V2) {
26953            let len = __tmp.len();
26954            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26955        } else {
26956            __tmp.len()
26957        }
26958    }
26959}
26960#[doc = "id: 126"]
26961#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
26962#[derive(Debug, Clone, PartialEq)]
26963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26965pub struct SERIAL_CONTROL_DATA {
26966    #[doc = "Baudrate of transfer. Zero means no change."]
26967    pub baudrate: u32,
26968    #[doc = "Timeout for reply data"]
26969    pub timeout: u16,
26970    #[doc = "Serial control device type."]
26971    pub device: SerialControlDev,
26972    #[doc = "Bitmap of serial control flags."]
26973    pub flags: SerialControlFlag,
26974    #[doc = "how many bytes in this transfer"]
26975    pub count: u8,
26976    #[doc = "serial data"]
26977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26978    pub data: [u8; 70],
26979    #[doc = "System ID"]
26980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26981    pub target_system: u8,
26982    #[doc = "Component ID"]
26983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26984    pub target_component: u8,
26985}
26986impl SERIAL_CONTROL_DATA {
26987    pub const ENCODED_LEN: usize = 81usize;
26988    pub const DEFAULT: Self = Self {
26989        baudrate: 0_u32,
26990        timeout: 0_u16,
26991        device: SerialControlDev::DEFAULT,
26992        flags: SerialControlFlag::DEFAULT,
26993        count: 0_u8,
26994        data: [0_u8; 70usize],
26995        target_system: 0_u8,
26996        target_component: 0_u8,
26997    };
26998    #[cfg(feature = "arbitrary")]
26999    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27000        use arbitrary::{Arbitrary, Unstructured};
27001        let mut buf = [0u8; 1024];
27002        rng.fill_bytes(&mut buf);
27003        let mut unstructured = Unstructured::new(&buf);
27004        Self::arbitrary(&mut unstructured).unwrap_or_default()
27005    }
27006}
27007impl Default for SERIAL_CONTROL_DATA {
27008    fn default() -> Self {
27009        Self::DEFAULT.clone()
27010    }
27011}
27012impl MessageData for SERIAL_CONTROL_DATA {
27013    type Message = MavMessage;
27014    const ID: u32 = 126u32;
27015    const NAME: &'static str = "SERIAL_CONTROL";
27016    const EXTRA_CRC: u8 = 220u8;
27017    const ENCODED_LEN: usize = 81usize;
27018    fn deser(
27019        _version: MavlinkVersion,
27020        __input: &[u8],
27021    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27022        let avail_len = __input.len();
27023        let mut payload_buf = [0; Self::ENCODED_LEN];
27024        let mut buf = if avail_len < Self::ENCODED_LEN {
27025            payload_buf[0..avail_len].copy_from_slice(__input);
27026            Bytes::new(&payload_buf)
27027        } else {
27028            Bytes::new(__input)
27029        };
27030        let mut __struct = Self::default();
27031        __struct.baudrate = buf.get_u32_le();
27032        __struct.timeout = buf.get_u16_le();
27033        let tmp = buf.get_u8();
27034        __struct.device =
27035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27036                enum_type: "SerialControlDev",
27037                value: tmp as u32,
27038            })?;
27039        let tmp = buf.get_u8();
27040        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27041            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27042                flag_type: "SerialControlFlag",
27043                value: tmp as u32,
27044            })?;
27045        __struct.count = buf.get_u8();
27046        for v in &mut __struct.data {
27047            let val = buf.get_u8();
27048            *v = val;
27049        }
27050        __struct.target_system = buf.get_u8();
27051        __struct.target_component = buf.get_u8();
27052        Ok(__struct)
27053    }
27054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27055        let mut __tmp = BytesMut::new(bytes);
27056        #[allow(clippy::absurd_extreme_comparisons)]
27057        #[allow(unused_comparisons)]
27058        if __tmp.remaining() < Self::ENCODED_LEN {
27059            panic!(
27060                "buffer is too small (need {} bytes, but got {})",
27061                Self::ENCODED_LEN,
27062                __tmp.remaining(),
27063            )
27064        }
27065        __tmp.put_u32_le(self.baudrate);
27066        __tmp.put_u16_le(self.timeout);
27067        __tmp.put_u8(self.device as u8);
27068        __tmp.put_u8(self.flags.bits());
27069        __tmp.put_u8(self.count);
27070        for val in &self.data {
27071            __tmp.put_u8(*val);
27072        }
27073        __tmp.put_u8(self.target_system);
27074        __tmp.put_u8(self.target_component);
27075        if matches!(version, MavlinkVersion::V2) {
27076            let len = __tmp.len();
27077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27078        } else {
27079            __tmp.len()
27080        }
27081    }
27082}
27083#[doc = "id: 36"]
27084#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27085#[derive(Debug, Clone, PartialEq)]
27086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27087#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27088pub struct SERVO_OUTPUT_RAW_DATA {
27089    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27090    pub time_usec: u32,
27091    #[doc = "Servo output 1 value"]
27092    pub servo1_raw: u16,
27093    #[doc = "Servo output 2 value"]
27094    pub servo2_raw: u16,
27095    #[doc = "Servo output 3 value"]
27096    pub servo3_raw: u16,
27097    #[doc = "Servo output 4 value"]
27098    pub servo4_raw: u16,
27099    #[doc = "Servo output 5 value"]
27100    pub servo5_raw: u16,
27101    #[doc = "Servo output 6 value"]
27102    pub servo6_raw: u16,
27103    #[doc = "Servo output 7 value"]
27104    pub servo7_raw: u16,
27105    #[doc = "Servo output 8 value"]
27106    pub servo8_raw: u16,
27107    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27108    pub port: u8,
27109    #[doc = "Servo output 9 value"]
27110    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27111    pub servo9_raw: u16,
27112    #[doc = "Servo output 10 value"]
27113    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27114    pub servo10_raw: u16,
27115    #[doc = "Servo output 11 value"]
27116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27117    pub servo11_raw: u16,
27118    #[doc = "Servo output 12 value"]
27119    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27120    pub servo12_raw: u16,
27121    #[doc = "Servo output 13 value"]
27122    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27123    pub servo13_raw: u16,
27124    #[doc = "Servo output 14 value"]
27125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27126    pub servo14_raw: u16,
27127    #[doc = "Servo output 15 value"]
27128    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27129    pub servo15_raw: u16,
27130    #[doc = "Servo output 16 value"]
27131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27132    pub servo16_raw: u16,
27133}
27134impl SERVO_OUTPUT_RAW_DATA {
27135    pub const ENCODED_LEN: usize = 37usize;
27136    pub const DEFAULT: Self = Self {
27137        time_usec: 0_u32,
27138        servo1_raw: 0_u16,
27139        servo2_raw: 0_u16,
27140        servo3_raw: 0_u16,
27141        servo4_raw: 0_u16,
27142        servo5_raw: 0_u16,
27143        servo6_raw: 0_u16,
27144        servo7_raw: 0_u16,
27145        servo8_raw: 0_u16,
27146        port: 0_u8,
27147        servo9_raw: 0_u16,
27148        servo10_raw: 0_u16,
27149        servo11_raw: 0_u16,
27150        servo12_raw: 0_u16,
27151        servo13_raw: 0_u16,
27152        servo14_raw: 0_u16,
27153        servo15_raw: 0_u16,
27154        servo16_raw: 0_u16,
27155    };
27156    #[cfg(feature = "arbitrary")]
27157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27158        use arbitrary::{Arbitrary, Unstructured};
27159        let mut buf = [0u8; 1024];
27160        rng.fill_bytes(&mut buf);
27161        let mut unstructured = Unstructured::new(&buf);
27162        Self::arbitrary(&mut unstructured).unwrap_or_default()
27163    }
27164}
27165impl Default for SERVO_OUTPUT_RAW_DATA {
27166    fn default() -> Self {
27167        Self::DEFAULT.clone()
27168    }
27169}
27170impl MessageData for SERVO_OUTPUT_RAW_DATA {
27171    type Message = MavMessage;
27172    const ID: u32 = 36u32;
27173    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27174    const EXTRA_CRC: u8 = 222u8;
27175    const ENCODED_LEN: usize = 37usize;
27176    fn deser(
27177        _version: MavlinkVersion,
27178        __input: &[u8],
27179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27180        let avail_len = __input.len();
27181        let mut payload_buf = [0; Self::ENCODED_LEN];
27182        let mut buf = if avail_len < Self::ENCODED_LEN {
27183            payload_buf[0..avail_len].copy_from_slice(__input);
27184            Bytes::new(&payload_buf)
27185        } else {
27186            Bytes::new(__input)
27187        };
27188        let mut __struct = Self::default();
27189        __struct.time_usec = buf.get_u32_le();
27190        __struct.servo1_raw = buf.get_u16_le();
27191        __struct.servo2_raw = buf.get_u16_le();
27192        __struct.servo3_raw = buf.get_u16_le();
27193        __struct.servo4_raw = buf.get_u16_le();
27194        __struct.servo5_raw = buf.get_u16_le();
27195        __struct.servo6_raw = buf.get_u16_le();
27196        __struct.servo7_raw = buf.get_u16_le();
27197        __struct.servo8_raw = buf.get_u16_le();
27198        __struct.port = buf.get_u8();
27199        __struct.servo9_raw = buf.get_u16_le();
27200        __struct.servo10_raw = buf.get_u16_le();
27201        __struct.servo11_raw = buf.get_u16_le();
27202        __struct.servo12_raw = buf.get_u16_le();
27203        __struct.servo13_raw = buf.get_u16_le();
27204        __struct.servo14_raw = buf.get_u16_le();
27205        __struct.servo15_raw = buf.get_u16_le();
27206        __struct.servo16_raw = buf.get_u16_le();
27207        Ok(__struct)
27208    }
27209    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27210        let mut __tmp = BytesMut::new(bytes);
27211        #[allow(clippy::absurd_extreme_comparisons)]
27212        #[allow(unused_comparisons)]
27213        if __tmp.remaining() < Self::ENCODED_LEN {
27214            panic!(
27215                "buffer is too small (need {} bytes, but got {})",
27216                Self::ENCODED_LEN,
27217                __tmp.remaining(),
27218            )
27219        }
27220        __tmp.put_u32_le(self.time_usec);
27221        __tmp.put_u16_le(self.servo1_raw);
27222        __tmp.put_u16_le(self.servo2_raw);
27223        __tmp.put_u16_le(self.servo3_raw);
27224        __tmp.put_u16_le(self.servo4_raw);
27225        __tmp.put_u16_le(self.servo5_raw);
27226        __tmp.put_u16_le(self.servo6_raw);
27227        __tmp.put_u16_le(self.servo7_raw);
27228        __tmp.put_u16_le(self.servo8_raw);
27229        __tmp.put_u8(self.port);
27230        __tmp.put_u16_le(self.servo9_raw);
27231        __tmp.put_u16_le(self.servo10_raw);
27232        __tmp.put_u16_le(self.servo11_raw);
27233        __tmp.put_u16_le(self.servo12_raw);
27234        __tmp.put_u16_le(self.servo13_raw);
27235        __tmp.put_u16_le(self.servo14_raw);
27236        __tmp.put_u16_le(self.servo15_raw);
27237        __tmp.put_u16_le(self.servo16_raw);
27238        if matches!(version, MavlinkVersion::V2) {
27239            let len = __tmp.len();
27240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27241        } else {
27242            __tmp.len()
27243        }
27244    }
27245}
27246#[doc = "id: 256"]
27247#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27248#[derive(Debug, Clone, PartialEq)]
27249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27251pub struct SETUP_SIGNING_DATA {
27252    #[doc = "initial timestamp"]
27253    pub initial_timestamp: u64,
27254    #[doc = "system id of the target"]
27255    pub target_system: u8,
27256    #[doc = "component ID of the target"]
27257    pub target_component: u8,
27258    #[doc = "signing key"]
27259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27260    pub secret_key: [u8; 32],
27261}
27262impl SETUP_SIGNING_DATA {
27263    pub const ENCODED_LEN: usize = 42usize;
27264    pub const DEFAULT: Self = Self {
27265        initial_timestamp: 0_u64,
27266        target_system: 0_u8,
27267        target_component: 0_u8,
27268        secret_key: [0_u8; 32usize],
27269    };
27270    #[cfg(feature = "arbitrary")]
27271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27272        use arbitrary::{Arbitrary, Unstructured};
27273        let mut buf = [0u8; 1024];
27274        rng.fill_bytes(&mut buf);
27275        let mut unstructured = Unstructured::new(&buf);
27276        Self::arbitrary(&mut unstructured).unwrap_or_default()
27277    }
27278}
27279impl Default for SETUP_SIGNING_DATA {
27280    fn default() -> Self {
27281        Self::DEFAULT.clone()
27282    }
27283}
27284impl MessageData for SETUP_SIGNING_DATA {
27285    type Message = MavMessage;
27286    const ID: u32 = 256u32;
27287    const NAME: &'static str = "SETUP_SIGNING";
27288    const EXTRA_CRC: u8 = 71u8;
27289    const ENCODED_LEN: usize = 42usize;
27290    fn deser(
27291        _version: MavlinkVersion,
27292        __input: &[u8],
27293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27294        let avail_len = __input.len();
27295        let mut payload_buf = [0; Self::ENCODED_LEN];
27296        let mut buf = if avail_len < Self::ENCODED_LEN {
27297            payload_buf[0..avail_len].copy_from_slice(__input);
27298            Bytes::new(&payload_buf)
27299        } else {
27300            Bytes::new(__input)
27301        };
27302        let mut __struct = Self::default();
27303        __struct.initial_timestamp = buf.get_u64_le();
27304        __struct.target_system = buf.get_u8();
27305        __struct.target_component = buf.get_u8();
27306        for v in &mut __struct.secret_key {
27307            let val = buf.get_u8();
27308            *v = val;
27309        }
27310        Ok(__struct)
27311    }
27312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27313        let mut __tmp = BytesMut::new(bytes);
27314        #[allow(clippy::absurd_extreme_comparisons)]
27315        #[allow(unused_comparisons)]
27316        if __tmp.remaining() < Self::ENCODED_LEN {
27317            panic!(
27318                "buffer is too small (need {} bytes, but got {})",
27319                Self::ENCODED_LEN,
27320                __tmp.remaining(),
27321            )
27322        }
27323        __tmp.put_u64_le(self.initial_timestamp);
27324        __tmp.put_u8(self.target_system);
27325        __tmp.put_u8(self.target_component);
27326        for val in &self.secret_key {
27327            __tmp.put_u8(*val);
27328        }
27329        if matches!(version, MavlinkVersion::V2) {
27330            let len = __tmp.len();
27331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27332        } else {
27333            __tmp.len()
27334        }
27335    }
27336}
27337#[doc = "id: 139"]
27338#[doc = "Set the vehicle attitude and body angular rates."]
27339#[derive(Debug, Clone, PartialEq)]
27340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27342pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27343    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27344    pub time_usec: u64,
27345    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27347    pub controls: [f32; 8],
27348    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27349    pub group_mlx: u8,
27350    #[doc = "System ID"]
27351    pub target_system: u8,
27352    #[doc = "Component ID"]
27353    pub target_component: u8,
27354}
27355impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27356    pub const ENCODED_LEN: usize = 43usize;
27357    pub const DEFAULT: Self = Self {
27358        time_usec: 0_u64,
27359        controls: [0.0_f32; 8usize],
27360        group_mlx: 0_u8,
27361        target_system: 0_u8,
27362        target_component: 0_u8,
27363    };
27364    #[cfg(feature = "arbitrary")]
27365    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27366        use arbitrary::{Arbitrary, Unstructured};
27367        let mut buf = [0u8; 1024];
27368        rng.fill_bytes(&mut buf);
27369        let mut unstructured = Unstructured::new(&buf);
27370        Self::arbitrary(&mut unstructured).unwrap_or_default()
27371    }
27372}
27373impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27374    fn default() -> Self {
27375        Self::DEFAULT.clone()
27376    }
27377}
27378impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27379    type Message = MavMessage;
27380    const ID: u32 = 139u32;
27381    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27382    const EXTRA_CRC: u8 = 168u8;
27383    const ENCODED_LEN: usize = 43usize;
27384    fn deser(
27385        _version: MavlinkVersion,
27386        __input: &[u8],
27387    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27388        let avail_len = __input.len();
27389        let mut payload_buf = [0; Self::ENCODED_LEN];
27390        let mut buf = if avail_len < Self::ENCODED_LEN {
27391            payload_buf[0..avail_len].copy_from_slice(__input);
27392            Bytes::new(&payload_buf)
27393        } else {
27394            Bytes::new(__input)
27395        };
27396        let mut __struct = Self::default();
27397        __struct.time_usec = buf.get_u64_le();
27398        for v in &mut __struct.controls {
27399            let val = buf.get_f32_le();
27400            *v = val;
27401        }
27402        __struct.group_mlx = buf.get_u8();
27403        __struct.target_system = buf.get_u8();
27404        __struct.target_component = buf.get_u8();
27405        Ok(__struct)
27406    }
27407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27408        let mut __tmp = BytesMut::new(bytes);
27409        #[allow(clippy::absurd_extreme_comparisons)]
27410        #[allow(unused_comparisons)]
27411        if __tmp.remaining() < Self::ENCODED_LEN {
27412            panic!(
27413                "buffer is too small (need {} bytes, but got {})",
27414                Self::ENCODED_LEN,
27415                __tmp.remaining(),
27416            )
27417        }
27418        __tmp.put_u64_le(self.time_usec);
27419        for val in &self.controls {
27420            __tmp.put_f32_le(*val);
27421        }
27422        __tmp.put_u8(self.group_mlx);
27423        __tmp.put_u8(self.target_system);
27424        __tmp.put_u8(self.target_component);
27425        if matches!(version, MavlinkVersion::V2) {
27426            let len = __tmp.len();
27427            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27428        } else {
27429            __tmp.len()
27430        }
27431    }
27432}
27433#[doc = "id: 82"]
27434#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27435#[derive(Debug, Clone, PartialEq)]
27436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27438pub struct SET_ATTITUDE_TARGET_DATA {
27439    #[doc = "Timestamp (time since system boot)."]
27440    pub time_boot_ms: u32,
27441    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27442    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27443    pub q: [f32; 4],
27444    #[doc = "Body roll rate"]
27445    pub body_roll_rate: f32,
27446    #[doc = "Body pitch rate"]
27447    pub body_pitch_rate: f32,
27448    #[doc = "Body yaw rate"]
27449    pub body_yaw_rate: f32,
27450    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27451    pub thrust: f32,
27452    #[doc = "System ID"]
27453    pub target_system: u8,
27454    #[doc = "Component ID"]
27455    pub target_component: u8,
27456    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27457    pub type_mask: AttitudeTargetTypemask,
27458    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27459    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27461    pub thrust_body: [f32; 3],
27462}
27463impl SET_ATTITUDE_TARGET_DATA {
27464    pub const ENCODED_LEN: usize = 51usize;
27465    pub const DEFAULT: Self = Self {
27466        time_boot_ms: 0_u32,
27467        q: [0.0_f32; 4usize],
27468        body_roll_rate: 0.0_f32,
27469        body_pitch_rate: 0.0_f32,
27470        body_yaw_rate: 0.0_f32,
27471        thrust: 0.0_f32,
27472        target_system: 0_u8,
27473        target_component: 0_u8,
27474        type_mask: AttitudeTargetTypemask::DEFAULT,
27475        thrust_body: [0.0_f32; 3usize],
27476    };
27477    #[cfg(feature = "arbitrary")]
27478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27479        use arbitrary::{Arbitrary, Unstructured};
27480        let mut buf = [0u8; 1024];
27481        rng.fill_bytes(&mut buf);
27482        let mut unstructured = Unstructured::new(&buf);
27483        Self::arbitrary(&mut unstructured).unwrap_or_default()
27484    }
27485}
27486impl Default for SET_ATTITUDE_TARGET_DATA {
27487    fn default() -> Self {
27488        Self::DEFAULT.clone()
27489    }
27490}
27491impl MessageData for SET_ATTITUDE_TARGET_DATA {
27492    type Message = MavMessage;
27493    const ID: u32 = 82u32;
27494    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27495    const EXTRA_CRC: u8 = 49u8;
27496    const ENCODED_LEN: usize = 51usize;
27497    fn deser(
27498        _version: MavlinkVersion,
27499        __input: &[u8],
27500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27501        let avail_len = __input.len();
27502        let mut payload_buf = [0; Self::ENCODED_LEN];
27503        let mut buf = if avail_len < Self::ENCODED_LEN {
27504            payload_buf[0..avail_len].copy_from_slice(__input);
27505            Bytes::new(&payload_buf)
27506        } else {
27507            Bytes::new(__input)
27508        };
27509        let mut __struct = Self::default();
27510        __struct.time_boot_ms = buf.get_u32_le();
27511        for v in &mut __struct.q {
27512            let val = buf.get_f32_le();
27513            *v = val;
27514        }
27515        __struct.body_roll_rate = buf.get_f32_le();
27516        __struct.body_pitch_rate = buf.get_f32_le();
27517        __struct.body_yaw_rate = buf.get_f32_le();
27518        __struct.thrust = buf.get_f32_le();
27519        __struct.target_system = buf.get_u8();
27520        __struct.target_component = buf.get_u8();
27521        let tmp = buf.get_u8();
27522        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27523            tmp & AttitudeTargetTypemask::all().bits(),
27524        )
27525        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27526            flag_type: "AttitudeTargetTypemask",
27527            value: tmp as u32,
27528        })?;
27529        for v in &mut __struct.thrust_body {
27530            let val = buf.get_f32_le();
27531            *v = val;
27532        }
27533        Ok(__struct)
27534    }
27535    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27536        let mut __tmp = BytesMut::new(bytes);
27537        #[allow(clippy::absurd_extreme_comparisons)]
27538        #[allow(unused_comparisons)]
27539        if __tmp.remaining() < Self::ENCODED_LEN {
27540            panic!(
27541                "buffer is too small (need {} bytes, but got {})",
27542                Self::ENCODED_LEN,
27543                __tmp.remaining(),
27544            )
27545        }
27546        __tmp.put_u32_le(self.time_boot_ms);
27547        for val in &self.q {
27548            __tmp.put_f32_le(*val);
27549        }
27550        __tmp.put_f32_le(self.body_roll_rate);
27551        __tmp.put_f32_le(self.body_pitch_rate);
27552        __tmp.put_f32_le(self.body_yaw_rate);
27553        __tmp.put_f32_le(self.thrust);
27554        __tmp.put_u8(self.target_system);
27555        __tmp.put_u8(self.target_component);
27556        __tmp.put_u8(self.type_mask.bits());
27557        for val in &self.thrust_body {
27558            __tmp.put_f32_le(*val);
27559        }
27560        if matches!(version, MavlinkVersion::V2) {
27561            let len = __tmp.len();
27562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27563        } else {
27564            __tmp.len()
27565        }
27566    }
27567}
27568#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27569#[doc = "id: 48"]
27570#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27571#[derive(Debug, Clone, PartialEq)]
27572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27574pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27575    #[doc = "Latitude (WGS84)"]
27576    pub latitude: i32,
27577    #[doc = "Longitude (WGS84)"]
27578    pub longitude: i32,
27579    #[doc = "Altitude (MSL). Positive for up."]
27580    pub altitude: i32,
27581    #[doc = "System ID"]
27582    pub target_system: u8,
27583    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27584    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27585    pub time_usec: u64,
27586}
27587impl SET_GPS_GLOBAL_ORIGIN_DATA {
27588    pub const ENCODED_LEN: usize = 21usize;
27589    pub const DEFAULT: Self = Self {
27590        latitude: 0_i32,
27591        longitude: 0_i32,
27592        altitude: 0_i32,
27593        target_system: 0_u8,
27594        time_usec: 0_u64,
27595    };
27596    #[cfg(feature = "arbitrary")]
27597    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27598        use arbitrary::{Arbitrary, Unstructured};
27599        let mut buf = [0u8; 1024];
27600        rng.fill_bytes(&mut buf);
27601        let mut unstructured = Unstructured::new(&buf);
27602        Self::arbitrary(&mut unstructured).unwrap_or_default()
27603    }
27604}
27605impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27606    fn default() -> Self {
27607        Self::DEFAULT.clone()
27608    }
27609}
27610impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27611    type Message = MavMessage;
27612    const ID: u32 = 48u32;
27613    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27614    const EXTRA_CRC: u8 = 41u8;
27615    const ENCODED_LEN: usize = 21usize;
27616    fn deser(
27617        _version: MavlinkVersion,
27618        __input: &[u8],
27619    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27620        let avail_len = __input.len();
27621        let mut payload_buf = [0; Self::ENCODED_LEN];
27622        let mut buf = if avail_len < Self::ENCODED_LEN {
27623            payload_buf[0..avail_len].copy_from_slice(__input);
27624            Bytes::new(&payload_buf)
27625        } else {
27626            Bytes::new(__input)
27627        };
27628        let mut __struct = Self::default();
27629        __struct.latitude = buf.get_i32_le();
27630        __struct.longitude = buf.get_i32_le();
27631        __struct.altitude = buf.get_i32_le();
27632        __struct.target_system = buf.get_u8();
27633        __struct.time_usec = buf.get_u64_le();
27634        Ok(__struct)
27635    }
27636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27637        let mut __tmp = BytesMut::new(bytes);
27638        #[allow(clippy::absurd_extreme_comparisons)]
27639        #[allow(unused_comparisons)]
27640        if __tmp.remaining() < Self::ENCODED_LEN {
27641            panic!(
27642                "buffer is too small (need {} bytes, but got {})",
27643                Self::ENCODED_LEN,
27644                __tmp.remaining(),
27645            )
27646        }
27647        __tmp.put_i32_le(self.latitude);
27648        __tmp.put_i32_le(self.longitude);
27649        __tmp.put_i32_le(self.altitude);
27650        __tmp.put_u8(self.target_system);
27651        __tmp.put_u64_le(self.time_usec);
27652        if matches!(version, MavlinkVersion::V2) {
27653            let len = __tmp.len();
27654            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27655        } else {
27656            __tmp.len()
27657        }
27658    }
27659}
27660#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27661#[doc = "id: 243"]
27662#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27663#[derive(Debug, Clone, PartialEq)]
27664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27666pub struct SET_HOME_POSITION_DATA {
27667    #[doc = "Latitude (WGS84)"]
27668    pub latitude: i32,
27669    #[doc = "Longitude (WGS84)"]
27670    pub longitude: i32,
27671    #[doc = "Altitude (MSL). Positive for up."]
27672    pub altitude: i32,
27673    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27674    pub x: f32,
27675    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27676    pub y: f32,
27677    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27678    pub z: f32,
27679    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27680    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27681    pub q: [f32; 4],
27682    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27683    pub approach_x: f32,
27684    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27685    pub approach_y: f32,
27686    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27687    pub approach_z: f32,
27688    #[doc = "System ID."]
27689    pub target_system: u8,
27690    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27691    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27692    pub time_usec: u64,
27693}
27694impl SET_HOME_POSITION_DATA {
27695    pub const ENCODED_LEN: usize = 61usize;
27696    pub const DEFAULT: Self = Self {
27697        latitude: 0_i32,
27698        longitude: 0_i32,
27699        altitude: 0_i32,
27700        x: 0.0_f32,
27701        y: 0.0_f32,
27702        z: 0.0_f32,
27703        q: [0.0_f32; 4usize],
27704        approach_x: 0.0_f32,
27705        approach_y: 0.0_f32,
27706        approach_z: 0.0_f32,
27707        target_system: 0_u8,
27708        time_usec: 0_u64,
27709    };
27710    #[cfg(feature = "arbitrary")]
27711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27712        use arbitrary::{Arbitrary, Unstructured};
27713        let mut buf = [0u8; 1024];
27714        rng.fill_bytes(&mut buf);
27715        let mut unstructured = Unstructured::new(&buf);
27716        Self::arbitrary(&mut unstructured).unwrap_or_default()
27717    }
27718}
27719impl Default for SET_HOME_POSITION_DATA {
27720    fn default() -> Self {
27721        Self::DEFAULT.clone()
27722    }
27723}
27724impl MessageData for SET_HOME_POSITION_DATA {
27725    type Message = MavMessage;
27726    const ID: u32 = 243u32;
27727    const NAME: &'static str = "SET_HOME_POSITION";
27728    const EXTRA_CRC: u8 = 85u8;
27729    const ENCODED_LEN: usize = 61usize;
27730    fn deser(
27731        _version: MavlinkVersion,
27732        __input: &[u8],
27733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27734        let avail_len = __input.len();
27735        let mut payload_buf = [0; Self::ENCODED_LEN];
27736        let mut buf = if avail_len < Self::ENCODED_LEN {
27737            payload_buf[0..avail_len].copy_from_slice(__input);
27738            Bytes::new(&payload_buf)
27739        } else {
27740            Bytes::new(__input)
27741        };
27742        let mut __struct = Self::default();
27743        __struct.latitude = buf.get_i32_le();
27744        __struct.longitude = buf.get_i32_le();
27745        __struct.altitude = buf.get_i32_le();
27746        __struct.x = buf.get_f32_le();
27747        __struct.y = buf.get_f32_le();
27748        __struct.z = buf.get_f32_le();
27749        for v in &mut __struct.q {
27750            let val = buf.get_f32_le();
27751            *v = val;
27752        }
27753        __struct.approach_x = buf.get_f32_le();
27754        __struct.approach_y = buf.get_f32_le();
27755        __struct.approach_z = buf.get_f32_le();
27756        __struct.target_system = buf.get_u8();
27757        __struct.time_usec = buf.get_u64_le();
27758        Ok(__struct)
27759    }
27760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27761        let mut __tmp = BytesMut::new(bytes);
27762        #[allow(clippy::absurd_extreme_comparisons)]
27763        #[allow(unused_comparisons)]
27764        if __tmp.remaining() < Self::ENCODED_LEN {
27765            panic!(
27766                "buffer is too small (need {} bytes, but got {})",
27767                Self::ENCODED_LEN,
27768                __tmp.remaining(),
27769            )
27770        }
27771        __tmp.put_i32_le(self.latitude);
27772        __tmp.put_i32_le(self.longitude);
27773        __tmp.put_i32_le(self.altitude);
27774        __tmp.put_f32_le(self.x);
27775        __tmp.put_f32_le(self.y);
27776        __tmp.put_f32_le(self.z);
27777        for val in &self.q {
27778            __tmp.put_f32_le(*val);
27779        }
27780        __tmp.put_f32_le(self.approach_x);
27781        __tmp.put_f32_le(self.approach_y);
27782        __tmp.put_f32_le(self.approach_z);
27783        __tmp.put_u8(self.target_system);
27784        __tmp.put_u64_le(self.time_usec);
27785        if matches!(version, MavlinkVersion::V2) {
27786            let len = __tmp.len();
27787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27788        } else {
27789            __tmp.len()
27790        }
27791    }
27792}
27793#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27794#[doc = "id: 11"]
27795#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27796#[derive(Debug, Clone, PartialEq)]
27797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27799pub struct SET_MODE_DATA {
27800    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27801    pub custom_mode: u32,
27802    #[doc = "The system setting the mode"]
27803    pub target_system: u8,
27804    #[doc = "The new base mode."]
27805    pub base_mode: MavMode,
27806}
27807impl SET_MODE_DATA {
27808    pub const ENCODED_LEN: usize = 6usize;
27809    pub const DEFAULT: Self = Self {
27810        custom_mode: 0_u32,
27811        target_system: 0_u8,
27812        base_mode: MavMode::DEFAULT,
27813    };
27814    #[cfg(feature = "arbitrary")]
27815    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27816        use arbitrary::{Arbitrary, Unstructured};
27817        let mut buf = [0u8; 1024];
27818        rng.fill_bytes(&mut buf);
27819        let mut unstructured = Unstructured::new(&buf);
27820        Self::arbitrary(&mut unstructured).unwrap_or_default()
27821    }
27822}
27823impl Default for SET_MODE_DATA {
27824    fn default() -> Self {
27825        Self::DEFAULT.clone()
27826    }
27827}
27828impl MessageData for SET_MODE_DATA {
27829    type Message = MavMessage;
27830    const ID: u32 = 11u32;
27831    const NAME: &'static str = "SET_MODE";
27832    const EXTRA_CRC: u8 = 89u8;
27833    const ENCODED_LEN: usize = 6usize;
27834    fn deser(
27835        _version: MavlinkVersion,
27836        __input: &[u8],
27837    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27838        let avail_len = __input.len();
27839        let mut payload_buf = [0; Self::ENCODED_LEN];
27840        let mut buf = if avail_len < Self::ENCODED_LEN {
27841            payload_buf[0..avail_len].copy_from_slice(__input);
27842            Bytes::new(&payload_buf)
27843        } else {
27844            Bytes::new(__input)
27845        };
27846        let mut __struct = Self::default();
27847        __struct.custom_mode = buf.get_u32_le();
27848        __struct.target_system = buf.get_u8();
27849        let tmp = buf.get_u8();
27850        __struct.base_mode =
27851            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27852                enum_type: "MavMode",
27853                value: tmp as u32,
27854            })?;
27855        Ok(__struct)
27856    }
27857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27858        let mut __tmp = BytesMut::new(bytes);
27859        #[allow(clippy::absurd_extreme_comparisons)]
27860        #[allow(unused_comparisons)]
27861        if __tmp.remaining() < Self::ENCODED_LEN {
27862            panic!(
27863                "buffer is too small (need {} bytes, but got {})",
27864                Self::ENCODED_LEN,
27865                __tmp.remaining(),
27866            )
27867        }
27868        __tmp.put_u32_le(self.custom_mode);
27869        __tmp.put_u8(self.target_system);
27870        __tmp.put_u8(self.base_mode as u8);
27871        if matches!(version, MavlinkVersion::V2) {
27872            let len = __tmp.len();
27873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27874        } else {
27875            __tmp.len()
27876        }
27877    }
27878}
27879#[doc = "id: 86"]
27880#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27881#[derive(Debug, Clone, PartialEq)]
27882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27884pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27885    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27886    pub time_boot_ms: u32,
27887    #[doc = "Latitude in WGS84 frame"]
27888    pub lat_int: i32,
27889    #[doc = "Longitude in WGS84 frame"]
27890    pub lon_int: i32,
27891    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27892    pub alt: f32,
27893    #[doc = "X velocity in NED frame"]
27894    pub vx: f32,
27895    #[doc = "Y velocity in NED frame"]
27896    pub vy: f32,
27897    #[doc = "Z velocity in NED frame"]
27898    pub vz: f32,
27899    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27900    pub afx: f32,
27901    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27902    pub afy: f32,
27903    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27904    pub afz: f32,
27905    #[doc = "yaw setpoint"]
27906    pub yaw: f32,
27907    #[doc = "yaw rate setpoint"]
27908    pub yaw_rate: f32,
27909    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27910    pub type_mask: PositionTargetTypemask,
27911    #[doc = "System ID"]
27912    pub target_system: u8,
27913    #[doc = "Component ID"]
27914    pub target_component: u8,
27915    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27916    pub coordinate_frame: MavFrame,
27917}
27918impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
27919    pub const ENCODED_LEN: usize = 53usize;
27920    pub const DEFAULT: Self = Self {
27921        time_boot_ms: 0_u32,
27922        lat_int: 0_i32,
27923        lon_int: 0_i32,
27924        alt: 0.0_f32,
27925        vx: 0.0_f32,
27926        vy: 0.0_f32,
27927        vz: 0.0_f32,
27928        afx: 0.0_f32,
27929        afy: 0.0_f32,
27930        afz: 0.0_f32,
27931        yaw: 0.0_f32,
27932        yaw_rate: 0.0_f32,
27933        type_mask: PositionTargetTypemask::DEFAULT,
27934        target_system: 0_u8,
27935        target_component: 0_u8,
27936        coordinate_frame: MavFrame::DEFAULT,
27937    };
27938    #[cfg(feature = "arbitrary")]
27939    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27940        use arbitrary::{Arbitrary, Unstructured};
27941        let mut buf = [0u8; 1024];
27942        rng.fill_bytes(&mut buf);
27943        let mut unstructured = Unstructured::new(&buf);
27944        Self::arbitrary(&mut unstructured).unwrap_or_default()
27945    }
27946}
27947impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27948    fn default() -> Self {
27949        Self::DEFAULT.clone()
27950    }
27951}
27952impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27953    type Message = MavMessage;
27954    const ID: u32 = 86u32;
27955    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
27956    const EXTRA_CRC: u8 = 5u8;
27957    const ENCODED_LEN: usize = 53usize;
27958    fn deser(
27959        _version: MavlinkVersion,
27960        __input: &[u8],
27961    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27962        let avail_len = __input.len();
27963        let mut payload_buf = [0; Self::ENCODED_LEN];
27964        let mut buf = if avail_len < Self::ENCODED_LEN {
27965            payload_buf[0..avail_len].copy_from_slice(__input);
27966            Bytes::new(&payload_buf)
27967        } else {
27968            Bytes::new(__input)
27969        };
27970        let mut __struct = Self::default();
27971        __struct.time_boot_ms = buf.get_u32_le();
27972        __struct.lat_int = buf.get_i32_le();
27973        __struct.lon_int = buf.get_i32_le();
27974        __struct.alt = buf.get_f32_le();
27975        __struct.vx = buf.get_f32_le();
27976        __struct.vy = buf.get_f32_le();
27977        __struct.vz = buf.get_f32_le();
27978        __struct.afx = buf.get_f32_le();
27979        __struct.afy = buf.get_f32_le();
27980        __struct.afz = buf.get_f32_le();
27981        __struct.yaw = buf.get_f32_le();
27982        __struct.yaw_rate = buf.get_f32_le();
27983        let tmp = buf.get_u16_le();
27984        __struct.type_mask = PositionTargetTypemask::from_bits(
27985            tmp & PositionTargetTypemask::all().bits(),
27986        )
27987        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27988            flag_type: "PositionTargetTypemask",
27989            value: tmp as u32,
27990        })?;
27991        __struct.target_system = buf.get_u8();
27992        __struct.target_component = buf.get_u8();
27993        let tmp = buf.get_u8();
27994        __struct.coordinate_frame =
27995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27996                enum_type: "MavFrame",
27997                value: tmp as u32,
27998            })?;
27999        Ok(__struct)
28000    }
28001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28002        let mut __tmp = BytesMut::new(bytes);
28003        #[allow(clippy::absurd_extreme_comparisons)]
28004        #[allow(unused_comparisons)]
28005        if __tmp.remaining() < Self::ENCODED_LEN {
28006            panic!(
28007                "buffer is too small (need {} bytes, but got {})",
28008                Self::ENCODED_LEN,
28009                __tmp.remaining(),
28010            )
28011        }
28012        __tmp.put_u32_le(self.time_boot_ms);
28013        __tmp.put_i32_le(self.lat_int);
28014        __tmp.put_i32_le(self.lon_int);
28015        __tmp.put_f32_le(self.alt);
28016        __tmp.put_f32_le(self.vx);
28017        __tmp.put_f32_le(self.vy);
28018        __tmp.put_f32_le(self.vz);
28019        __tmp.put_f32_le(self.afx);
28020        __tmp.put_f32_le(self.afy);
28021        __tmp.put_f32_le(self.afz);
28022        __tmp.put_f32_le(self.yaw);
28023        __tmp.put_f32_le(self.yaw_rate);
28024        __tmp.put_u16_le(self.type_mask.bits());
28025        __tmp.put_u8(self.target_system);
28026        __tmp.put_u8(self.target_component);
28027        __tmp.put_u8(self.coordinate_frame as u8);
28028        if matches!(version, MavlinkVersion::V2) {
28029            let len = __tmp.len();
28030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28031        } else {
28032            __tmp.len()
28033        }
28034    }
28035}
28036#[doc = "id: 84"]
28037#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28038#[derive(Debug, Clone, PartialEq)]
28039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28040#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28041pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28042    #[doc = "Timestamp (time since system boot)."]
28043    pub time_boot_ms: u32,
28044    #[doc = "X Position in NED frame"]
28045    pub x: f32,
28046    #[doc = "Y Position in NED frame"]
28047    pub y: f32,
28048    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28049    pub z: f32,
28050    #[doc = "X velocity in NED frame"]
28051    pub vx: f32,
28052    #[doc = "Y velocity in NED frame"]
28053    pub vy: f32,
28054    #[doc = "Z velocity in NED frame"]
28055    pub vz: f32,
28056    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28057    pub afx: f32,
28058    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28059    pub afy: f32,
28060    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28061    pub afz: f32,
28062    #[doc = "yaw setpoint"]
28063    pub yaw: f32,
28064    #[doc = "yaw rate setpoint"]
28065    pub yaw_rate: f32,
28066    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28067    pub type_mask: PositionTargetTypemask,
28068    #[doc = "System ID"]
28069    pub target_system: u8,
28070    #[doc = "Component ID"]
28071    pub target_component: u8,
28072    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28073    pub coordinate_frame: MavFrame,
28074}
28075impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28076    pub const ENCODED_LEN: usize = 53usize;
28077    pub const DEFAULT: Self = Self {
28078        time_boot_ms: 0_u32,
28079        x: 0.0_f32,
28080        y: 0.0_f32,
28081        z: 0.0_f32,
28082        vx: 0.0_f32,
28083        vy: 0.0_f32,
28084        vz: 0.0_f32,
28085        afx: 0.0_f32,
28086        afy: 0.0_f32,
28087        afz: 0.0_f32,
28088        yaw: 0.0_f32,
28089        yaw_rate: 0.0_f32,
28090        type_mask: PositionTargetTypemask::DEFAULT,
28091        target_system: 0_u8,
28092        target_component: 0_u8,
28093        coordinate_frame: MavFrame::DEFAULT,
28094    };
28095    #[cfg(feature = "arbitrary")]
28096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28097        use arbitrary::{Arbitrary, Unstructured};
28098        let mut buf = [0u8; 1024];
28099        rng.fill_bytes(&mut buf);
28100        let mut unstructured = Unstructured::new(&buf);
28101        Self::arbitrary(&mut unstructured).unwrap_or_default()
28102    }
28103}
28104impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28105    fn default() -> Self {
28106        Self::DEFAULT.clone()
28107    }
28108}
28109impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28110    type Message = MavMessage;
28111    const ID: u32 = 84u32;
28112    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28113    const EXTRA_CRC: u8 = 143u8;
28114    const ENCODED_LEN: usize = 53usize;
28115    fn deser(
28116        _version: MavlinkVersion,
28117        __input: &[u8],
28118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28119        let avail_len = __input.len();
28120        let mut payload_buf = [0; Self::ENCODED_LEN];
28121        let mut buf = if avail_len < Self::ENCODED_LEN {
28122            payload_buf[0..avail_len].copy_from_slice(__input);
28123            Bytes::new(&payload_buf)
28124        } else {
28125            Bytes::new(__input)
28126        };
28127        let mut __struct = Self::default();
28128        __struct.time_boot_ms = buf.get_u32_le();
28129        __struct.x = buf.get_f32_le();
28130        __struct.y = buf.get_f32_le();
28131        __struct.z = buf.get_f32_le();
28132        __struct.vx = buf.get_f32_le();
28133        __struct.vy = buf.get_f32_le();
28134        __struct.vz = buf.get_f32_le();
28135        __struct.afx = buf.get_f32_le();
28136        __struct.afy = buf.get_f32_le();
28137        __struct.afz = buf.get_f32_le();
28138        __struct.yaw = buf.get_f32_le();
28139        __struct.yaw_rate = buf.get_f32_le();
28140        let tmp = buf.get_u16_le();
28141        __struct.type_mask = PositionTargetTypemask::from_bits(
28142            tmp & PositionTargetTypemask::all().bits(),
28143        )
28144        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28145            flag_type: "PositionTargetTypemask",
28146            value: tmp as u32,
28147        })?;
28148        __struct.target_system = buf.get_u8();
28149        __struct.target_component = buf.get_u8();
28150        let tmp = buf.get_u8();
28151        __struct.coordinate_frame =
28152            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28153                enum_type: "MavFrame",
28154                value: tmp as u32,
28155            })?;
28156        Ok(__struct)
28157    }
28158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28159        let mut __tmp = BytesMut::new(bytes);
28160        #[allow(clippy::absurd_extreme_comparisons)]
28161        #[allow(unused_comparisons)]
28162        if __tmp.remaining() < Self::ENCODED_LEN {
28163            panic!(
28164                "buffer is too small (need {} bytes, but got {})",
28165                Self::ENCODED_LEN,
28166                __tmp.remaining(),
28167            )
28168        }
28169        __tmp.put_u32_le(self.time_boot_ms);
28170        __tmp.put_f32_le(self.x);
28171        __tmp.put_f32_le(self.y);
28172        __tmp.put_f32_le(self.z);
28173        __tmp.put_f32_le(self.vx);
28174        __tmp.put_f32_le(self.vy);
28175        __tmp.put_f32_le(self.vz);
28176        __tmp.put_f32_le(self.afx);
28177        __tmp.put_f32_le(self.afy);
28178        __tmp.put_f32_le(self.afz);
28179        __tmp.put_f32_le(self.yaw);
28180        __tmp.put_f32_le(self.yaw_rate);
28181        __tmp.put_u16_le(self.type_mask.bits());
28182        __tmp.put_u8(self.target_system);
28183        __tmp.put_u8(self.target_component);
28184        __tmp.put_u8(self.coordinate_frame as u8);
28185        if matches!(version, MavlinkVersion::V2) {
28186            let len = __tmp.len();
28187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28188        } else {
28189            __tmp.len()
28190        }
28191    }
28192}
28193#[doc = "id: 108"]
28194#[doc = "Status of simulation environment, if used."]
28195#[derive(Debug, Clone, PartialEq)]
28196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28198pub struct SIM_STATE_DATA {
28199    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28200    pub q1: f32,
28201    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28202    pub q2: f32,
28203    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28204    pub q3: f32,
28205    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28206    pub q4: f32,
28207    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28208    pub roll: f32,
28209    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28210    pub pitch: f32,
28211    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28212    pub yaw: f32,
28213    #[doc = "X acceleration"]
28214    pub xacc: f32,
28215    #[doc = "Y acceleration"]
28216    pub yacc: f32,
28217    #[doc = "Z acceleration"]
28218    pub zacc: f32,
28219    #[doc = "Angular speed around X axis"]
28220    pub xgyro: f32,
28221    #[doc = "Angular speed around Y axis"]
28222    pub ygyro: f32,
28223    #[doc = "Angular speed around Z axis"]
28224    pub zgyro: f32,
28225    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28226    pub lat: f32,
28227    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28228    pub lon: f32,
28229    #[doc = "Altitude"]
28230    pub alt: f32,
28231    #[doc = "Horizontal position standard deviation"]
28232    pub std_dev_horz: f32,
28233    #[doc = "Vertical position standard deviation"]
28234    pub std_dev_vert: f32,
28235    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28236    pub vn: f32,
28237    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28238    pub ve: f32,
28239    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28240    pub vd: f32,
28241    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28243    pub lat_int: i32,
28244    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28245    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28246    pub lon_int: i32,
28247}
28248impl SIM_STATE_DATA {
28249    pub const ENCODED_LEN: usize = 92usize;
28250    pub const DEFAULT: Self = Self {
28251        q1: 0.0_f32,
28252        q2: 0.0_f32,
28253        q3: 0.0_f32,
28254        q4: 0.0_f32,
28255        roll: 0.0_f32,
28256        pitch: 0.0_f32,
28257        yaw: 0.0_f32,
28258        xacc: 0.0_f32,
28259        yacc: 0.0_f32,
28260        zacc: 0.0_f32,
28261        xgyro: 0.0_f32,
28262        ygyro: 0.0_f32,
28263        zgyro: 0.0_f32,
28264        lat: 0.0_f32,
28265        lon: 0.0_f32,
28266        alt: 0.0_f32,
28267        std_dev_horz: 0.0_f32,
28268        std_dev_vert: 0.0_f32,
28269        vn: 0.0_f32,
28270        ve: 0.0_f32,
28271        vd: 0.0_f32,
28272        lat_int: 0_i32,
28273        lon_int: 0_i32,
28274    };
28275    #[cfg(feature = "arbitrary")]
28276    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28277        use arbitrary::{Arbitrary, Unstructured};
28278        let mut buf = [0u8; 1024];
28279        rng.fill_bytes(&mut buf);
28280        let mut unstructured = Unstructured::new(&buf);
28281        Self::arbitrary(&mut unstructured).unwrap_or_default()
28282    }
28283}
28284impl Default for SIM_STATE_DATA {
28285    fn default() -> Self {
28286        Self::DEFAULT.clone()
28287    }
28288}
28289impl MessageData for SIM_STATE_DATA {
28290    type Message = MavMessage;
28291    const ID: u32 = 108u32;
28292    const NAME: &'static str = "SIM_STATE";
28293    const EXTRA_CRC: u8 = 32u8;
28294    const ENCODED_LEN: usize = 92usize;
28295    fn deser(
28296        _version: MavlinkVersion,
28297        __input: &[u8],
28298    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28299        let avail_len = __input.len();
28300        let mut payload_buf = [0; Self::ENCODED_LEN];
28301        let mut buf = if avail_len < Self::ENCODED_LEN {
28302            payload_buf[0..avail_len].copy_from_slice(__input);
28303            Bytes::new(&payload_buf)
28304        } else {
28305            Bytes::new(__input)
28306        };
28307        let mut __struct = Self::default();
28308        __struct.q1 = buf.get_f32_le();
28309        __struct.q2 = buf.get_f32_le();
28310        __struct.q3 = buf.get_f32_le();
28311        __struct.q4 = buf.get_f32_le();
28312        __struct.roll = buf.get_f32_le();
28313        __struct.pitch = buf.get_f32_le();
28314        __struct.yaw = buf.get_f32_le();
28315        __struct.xacc = buf.get_f32_le();
28316        __struct.yacc = buf.get_f32_le();
28317        __struct.zacc = buf.get_f32_le();
28318        __struct.xgyro = buf.get_f32_le();
28319        __struct.ygyro = buf.get_f32_le();
28320        __struct.zgyro = buf.get_f32_le();
28321        __struct.lat = buf.get_f32_le();
28322        __struct.lon = buf.get_f32_le();
28323        __struct.alt = buf.get_f32_le();
28324        __struct.std_dev_horz = buf.get_f32_le();
28325        __struct.std_dev_vert = buf.get_f32_le();
28326        __struct.vn = buf.get_f32_le();
28327        __struct.ve = buf.get_f32_le();
28328        __struct.vd = buf.get_f32_le();
28329        __struct.lat_int = buf.get_i32_le();
28330        __struct.lon_int = buf.get_i32_le();
28331        Ok(__struct)
28332    }
28333    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28334        let mut __tmp = BytesMut::new(bytes);
28335        #[allow(clippy::absurd_extreme_comparisons)]
28336        #[allow(unused_comparisons)]
28337        if __tmp.remaining() < Self::ENCODED_LEN {
28338            panic!(
28339                "buffer is too small (need {} bytes, but got {})",
28340                Self::ENCODED_LEN,
28341                __tmp.remaining(),
28342            )
28343        }
28344        __tmp.put_f32_le(self.q1);
28345        __tmp.put_f32_le(self.q2);
28346        __tmp.put_f32_le(self.q3);
28347        __tmp.put_f32_le(self.q4);
28348        __tmp.put_f32_le(self.roll);
28349        __tmp.put_f32_le(self.pitch);
28350        __tmp.put_f32_le(self.yaw);
28351        __tmp.put_f32_le(self.xacc);
28352        __tmp.put_f32_le(self.yacc);
28353        __tmp.put_f32_le(self.zacc);
28354        __tmp.put_f32_le(self.xgyro);
28355        __tmp.put_f32_le(self.ygyro);
28356        __tmp.put_f32_le(self.zgyro);
28357        __tmp.put_f32_le(self.lat);
28358        __tmp.put_f32_le(self.lon);
28359        __tmp.put_f32_le(self.alt);
28360        __tmp.put_f32_le(self.std_dev_horz);
28361        __tmp.put_f32_le(self.std_dev_vert);
28362        __tmp.put_f32_le(self.vn);
28363        __tmp.put_f32_le(self.ve);
28364        __tmp.put_f32_le(self.vd);
28365        __tmp.put_i32_le(self.lat_int);
28366        __tmp.put_i32_le(self.lon_int);
28367        if matches!(version, MavlinkVersion::V2) {
28368            let len = __tmp.len();
28369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28370        } else {
28371            __tmp.len()
28372        }
28373    }
28374}
28375#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28376#[doc = "id: 370"]
28377#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28378#[derive(Debug, Clone, PartialEq)]
28379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28381pub struct SMART_BATTERY_INFO_DATA {
28382    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28383    pub capacity_full_specification: i32,
28384    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28385    pub capacity_full: i32,
28386    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28387    pub cycle_count: u16,
28388    #[doc = "Battery weight. 0: field not provided."]
28389    pub weight: u16,
28390    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28391    pub discharge_minimum_voltage: u16,
28392    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28393    pub charging_minimum_voltage: u16,
28394    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28395    pub resting_minimum_voltage: u16,
28396    #[doc = "Battery ID"]
28397    pub id: u8,
28398    #[doc = "Function of the battery"]
28399    pub battery_function: MavBatteryFunction,
28400    #[doc = "Type (chemistry) of the battery"]
28401    pub mavtype: MavBatteryType,
28402    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28403    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28404    pub serial_number: [u8; 16],
28405    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28407    pub device_name: [u8; 50],
28408    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28409    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28410    pub charging_maximum_voltage: u16,
28411    #[doc = "Number of battery cells in series. 0: field not provided."]
28412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28413    pub cells_in_series: u8,
28414    #[doc = "Maximum pack discharge current. 0: field not provided."]
28415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28416    pub discharge_maximum_current: u32,
28417    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28419    pub discharge_maximum_burst_current: u32,
28420    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28423    pub manufacture_date: [u8; 11],
28424}
28425impl SMART_BATTERY_INFO_DATA {
28426    pub const ENCODED_LEN: usize = 109usize;
28427    pub const DEFAULT: Self = Self {
28428        capacity_full_specification: 0_i32,
28429        capacity_full: 0_i32,
28430        cycle_count: 0_u16,
28431        weight: 0_u16,
28432        discharge_minimum_voltage: 0_u16,
28433        charging_minimum_voltage: 0_u16,
28434        resting_minimum_voltage: 0_u16,
28435        id: 0_u8,
28436        battery_function: MavBatteryFunction::DEFAULT,
28437        mavtype: MavBatteryType::DEFAULT,
28438        serial_number: [0_u8; 16usize],
28439        device_name: [0_u8; 50usize],
28440        charging_maximum_voltage: 0_u16,
28441        cells_in_series: 0_u8,
28442        discharge_maximum_current: 0_u32,
28443        discharge_maximum_burst_current: 0_u32,
28444        manufacture_date: [0_u8; 11usize],
28445    };
28446    #[cfg(feature = "arbitrary")]
28447    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28448        use arbitrary::{Arbitrary, Unstructured};
28449        let mut buf = [0u8; 1024];
28450        rng.fill_bytes(&mut buf);
28451        let mut unstructured = Unstructured::new(&buf);
28452        Self::arbitrary(&mut unstructured).unwrap_or_default()
28453    }
28454}
28455impl Default for SMART_BATTERY_INFO_DATA {
28456    fn default() -> Self {
28457        Self::DEFAULT.clone()
28458    }
28459}
28460impl MessageData for SMART_BATTERY_INFO_DATA {
28461    type Message = MavMessage;
28462    const ID: u32 = 370u32;
28463    const NAME: &'static str = "SMART_BATTERY_INFO";
28464    const EXTRA_CRC: u8 = 75u8;
28465    const ENCODED_LEN: usize = 109usize;
28466    fn deser(
28467        _version: MavlinkVersion,
28468        __input: &[u8],
28469    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28470        let avail_len = __input.len();
28471        let mut payload_buf = [0; Self::ENCODED_LEN];
28472        let mut buf = if avail_len < Self::ENCODED_LEN {
28473            payload_buf[0..avail_len].copy_from_slice(__input);
28474            Bytes::new(&payload_buf)
28475        } else {
28476            Bytes::new(__input)
28477        };
28478        let mut __struct = Self::default();
28479        __struct.capacity_full_specification = buf.get_i32_le();
28480        __struct.capacity_full = buf.get_i32_le();
28481        __struct.cycle_count = buf.get_u16_le();
28482        __struct.weight = buf.get_u16_le();
28483        __struct.discharge_minimum_voltage = buf.get_u16_le();
28484        __struct.charging_minimum_voltage = buf.get_u16_le();
28485        __struct.resting_minimum_voltage = buf.get_u16_le();
28486        __struct.id = buf.get_u8();
28487        let tmp = buf.get_u8();
28488        __struct.battery_function =
28489            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28490                enum_type: "MavBatteryFunction",
28491                value: tmp as u32,
28492            })?;
28493        let tmp = buf.get_u8();
28494        __struct.mavtype =
28495            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28496                enum_type: "MavBatteryType",
28497                value: tmp as u32,
28498            })?;
28499        for v in &mut __struct.serial_number {
28500            let val = buf.get_u8();
28501            *v = val;
28502        }
28503        for v in &mut __struct.device_name {
28504            let val = buf.get_u8();
28505            *v = val;
28506        }
28507        __struct.charging_maximum_voltage = buf.get_u16_le();
28508        __struct.cells_in_series = buf.get_u8();
28509        __struct.discharge_maximum_current = buf.get_u32_le();
28510        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28511        for v in &mut __struct.manufacture_date {
28512            let val = buf.get_u8();
28513            *v = val;
28514        }
28515        Ok(__struct)
28516    }
28517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28518        let mut __tmp = BytesMut::new(bytes);
28519        #[allow(clippy::absurd_extreme_comparisons)]
28520        #[allow(unused_comparisons)]
28521        if __tmp.remaining() < Self::ENCODED_LEN {
28522            panic!(
28523                "buffer is too small (need {} bytes, but got {})",
28524                Self::ENCODED_LEN,
28525                __tmp.remaining(),
28526            )
28527        }
28528        __tmp.put_i32_le(self.capacity_full_specification);
28529        __tmp.put_i32_le(self.capacity_full);
28530        __tmp.put_u16_le(self.cycle_count);
28531        __tmp.put_u16_le(self.weight);
28532        __tmp.put_u16_le(self.discharge_minimum_voltage);
28533        __tmp.put_u16_le(self.charging_minimum_voltage);
28534        __tmp.put_u16_le(self.resting_minimum_voltage);
28535        __tmp.put_u8(self.id);
28536        __tmp.put_u8(self.battery_function as u8);
28537        __tmp.put_u8(self.mavtype as u8);
28538        for val in &self.serial_number {
28539            __tmp.put_u8(*val);
28540        }
28541        for val in &self.device_name {
28542            __tmp.put_u8(*val);
28543        }
28544        __tmp.put_u16_le(self.charging_maximum_voltage);
28545        __tmp.put_u8(self.cells_in_series);
28546        __tmp.put_u32_le(self.discharge_maximum_current);
28547        __tmp.put_u32_le(self.discharge_maximum_burst_current);
28548        for val in &self.manufacture_date {
28549            __tmp.put_u8(*val);
28550        }
28551        if matches!(version, MavlinkVersion::V2) {
28552            let len = __tmp.len();
28553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28554        } else {
28555            __tmp.len()
28556        }
28557    }
28558}
28559#[doc = "id: 253"]
28560#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28561#[derive(Debug, Clone, PartialEq)]
28562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28564pub struct STATUSTEXT_DATA {
28565    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28566    pub severity: MavSeverity,
28567    #[doc = "Status text message, without null termination character"]
28568    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28569    pub text: [u8; 50],
28570    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28571    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28572    pub id: u16,
28573    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28574    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28575    pub chunk_seq: u8,
28576}
28577impl STATUSTEXT_DATA {
28578    pub const ENCODED_LEN: usize = 54usize;
28579    pub const DEFAULT: Self = Self {
28580        severity: MavSeverity::DEFAULT,
28581        text: [0_u8; 50usize],
28582        id: 0_u16,
28583        chunk_seq: 0_u8,
28584    };
28585    #[cfg(feature = "arbitrary")]
28586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28587        use arbitrary::{Arbitrary, Unstructured};
28588        let mut buf = [0u8; 1024];
28589        rng.fill_bytes(&mut buf);
28590        let mut unstructured = Unstructured::new(&buf);
28591        Self::arbitrary(&mut unstructured).unwrap_or_default()
28592    }
28593}
28594impl Default for STATUSTEXT_DATA {
28595    fn default() -> Self {
28596        Self::DEFAULT.clone()
28597    }
28598}
28599impl MessageData for STATUSTEXT_DATA {
28600    type Message = MavMessage;
28601    const ID: u32 = 253u32;
28602    const NAME: &'static str = "STATUSTEXT";
28603    const EXTRA_CRC: u8 = 83u8;
28604    const ENCODED_LEN: usize = 54usize;
28605    fn deser(
28606        _version: MavlinkVersion,
28607        __input: &[u8],
28608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28609        let avail_len = __input.len();
28610        let mut payload_buf = [0; Self::ENCODED_LEN];
28611        let mut buf = if avail_len < Self::ENCODED_LEN {
28612            payload_buf[0..avail_len].copy_from_slice(__input);
28613            Bytes::new(&payload_buf)
28614        } else {
28615            Bytes::new(__input)
28616        };
28617        let mut __struct = Self::default();
28618        let tmp = buf.get_u8();
28619        __struct.severity =
28620            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28621                enum_type: "MavSeverity",
28622                value: tmp as u32,
28623            })?;
28624        for v in &mut __struct.text {
28625            let val = buf.get_u8();
28626            *v = val;
28627        }
28628        __struct.id = buf.get_u16_le();
28629        __struct.chunk_seq = buf.get_u8();
28630        Ok(__struct)
28631    }
28632    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28633        let mut __tmp = BytesMut::new(bytes);
28634        #[allow(clippy::absurd_extreme_comparisons)]
28635        #[allow(unused_comparisons)]
28636        if __tmp.remaining() < Self::ENCODED_LEN {
28637            panic!(
28638                "buffer is too small (need {} bytes, but got {})",
28639                Self::ENCODED_LEN,
28640                __tmp.remaining(),
28641            )
28642        }
28643        __tmp.put_u8(self.severity as u8);
28644        for val in &self.text {
28645            __tmp.put_u8(*val);
28646        }
28647        __tmp.put_u16_le(self.id);
28648        __tmp.put_u8(self.chunk_seq);
28649        if matches!(version, MavlinkVersion::V2) {
28650            let len = __tmp.len();
28651            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28652        } else {
28653            __tmp.len()
28654        }
28655    }
28656}
28657#[doc = "id: 261"]
28658#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28659#[derive(Debug, Clone, PartialEq)]
28660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28661#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28662pub struct STORAGE_INFORMATION_DATA {
28663    #[doc = "Timestamp (time since system boot)."]
28664    pub time_boot_ms: u32,
28665    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28666    pub total_capacity: f32,
28667    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28668    pub used_capacity: f32,
28669    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28670    pub available_capacity: f32,
28671    #[doc = "Read speed."]
28672    pub read_speed: f32,
28673    #[doc = "Write speed."]
28674    pub write_speed: f32,
28675    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28676    pub storage_id: u8,
28677    #[doc = "Number of storage devices"]
28678    pub storage_count: u8,
28679    #[doc = "Status of storage"]
28680    pub status: StorageStatus,
28681    #[doc = "Type of storage"]
28682    #[cfg_attr(feature = "serde", serde(default))]
28683    pub mavtype: StorageType,
28684    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28686    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28687    pub name: [u8; 32],
28688    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28689    #[cfg_attr(feature = "serde", serde(default))]
28690    pub storage_usage: StorageUsageFlag,
28691}
28692impl STORAGE_INFORMATION_DATA {
28693    pub const ENCODED_LEN: usize = 61usize;
28694    pub const DEFAULT: Self = Self {
28695        time_boot_ms: 0_u32,
28696        total_capacity: 0.0_f32,
28697        used_capacity: 0.0_f32,
28698        available_capacity: 0.0_f32,
28699        read_speed: 0.0_f32,
28700        write_speed: 0.0_f32,
28701        storage_id: 0_u8,
28702        storage_count: 0_u8,
28703        status: StorageStatus::DEFAULT,
28704        mavtype: StorageType::DEFAULT,
28705        name: [0_u8; 32usize],
28706        storage_usage: StorageUsageFlag::DEFAULT,
28707    };
28708    #[cfg(feature = "arbitrary")]
28709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28710        use arbitrary::{Arbitrary, Unstructured};
28711        let mut buf = [0u8; 1024];
28712        rng.fill_bytes(&mut buf);
28713        let mut unstructured = Unstructured::new(&buf);
28714        Self::arbitrary(&mut unstructured).unwrap_or_default()
28715    }
28716}
28717impl Default for STORAGE_INFORMATION_DATA {
28718    fn default() -> Self {
28719        Self::DEFAULT.clone()
28720    }
28721}
28722impl MessageData for STORAGE_INFORMATION_DATA {
28723    type Message = MavMessage;
28724    const ID: u32 = 261u32;
28725    const NAME: &'static str = "STORAGE_INFORMATION";
28726    const EXTRA_CRC: u8 = 179u8;
28727    const ENCODED_LEN: usize = 61usize;
28728    fn deser(
28729        _version: MavlinkVersion,
28730        __input: &[u8],
28731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28732        let avail_len = __input.len();
28733        let mut payload_buf = [0; Self::ENCODED_LEN];
28734        let mut buf = if avail_len < Self::ENCODED_LEN {
28735            payload_buf[0..avail_len].copy_from_slice(__input);
28736            Bytes::new(&payload_buf)
28737        } else {
28738            Bytes::new(__input)
28739        };
28740        let mut __struct = Self::default();
28741        __struct.time_boot_ms = buf.get_u32_le();
28742        __struct.total_capacity = buf.get_f32_le();
28743        __struct.used_capacity = buf.get_f32_le();
28744        __struct.available_capacity = buf.get_f32_le();
28745        __struct.read_speed = buf.get_f32_le();
28746        __struct.write_speed = buf.get_f32_le();
28747        __struct.storage_id = buf.get_u8();
28748        __struct.storage_count = buf.get_u8();
28749        let tmp = buf.get_u8();
28750        __struct.status =
28751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28752                enum_type: "StorageStatus",
28753                value: tmp as u32,
28754            })?;
28755        let tmp = buf.get_u8();
28756        __struct.mavtype =
28757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28758                enum_type: "StorageType",
28759                value: tmp as u32,
28760            })?;
28761        for v in &mut __struct.name {
28762            let val = buf.get_u8();
28763            *v = val;
28764        }
28765        let tmp = buf.get_u8();
28766        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28767            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28768                flag_type: "StorageUsageFlag",
28769                value: tmp as u32,
28770            })?;
28771        Ok(__struct)
28772    }
28773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28774        let mut __tmp = BytesMut::new(bytes);
28775        #[allow(clippy::absurd_extreme_comparisons)]
28776        #[allow(unused_comparisons)]
28777        if __tmp.remaining() < Self::ENCODED_LEN {
28778            panic!(
28779                "buffer is too small (need {} bytes, but got {})",
28780                Self::ENCODED_LEN,
28781                __tmp.remaining(),
28782            )
28783        }
28784        __tmp.put_u32_le(self.time_boot_ms);
28785        __tmp.put_f32_le(self.total_capacity);
28786        __tmp.put_f32_le(self.used_capacity);
28787        __tmp.put_f32_le(self.available_capacity);
28788        __tmp.put_f32_le(self.read_speed);
28789        __tmp.put_f32_le(self.write_speed);
28790        __tmp.put_u8(self.storage_id);
28791        __tmp.put_u8(self.storage_count);
28792        __tmp.put_u8(self.status as u8);
28793        __tmp.put_u8(self.mavtype as u8);
28794        for val in &self.name {
28795            __tmp.put_u8(*val);
28796        }
28797        __tmp.put_u8(self.storage_usage.bits());
28798        if matches!(version, MavlinkVersion::V2) {
28799            let len = __tmp.len();
28800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28801        } else {
28802            __tmp.len()
28803        }
28804    }
28805}
28806#[doc = "id: 401"]
28807#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28808#[derive(Debug, Clone, PartialEq)]
28809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28811pub struct SUPPORTED_TUNES_DATA {
28812    #[doc = "Bitfield of supported tune formats."]
28813    pub format: TuneFormat,
28814    #[doc = "System ID"]
28815    pub target_system: u8,
28816    #[doc = "Component ID"]
28817    pub target_component: u8,
28818}
28819impl SUPPORTED_TUNES_DATA {
28820    pub const ENCODED_LEN: usize = 6usize;
28821    pub const DEFAULT: Self = Self {
28822        format: TuneFormat::DEFAULT,
28823        target_system: 0_u8,
28824        target_component: 0_u8,
28825    };
28826    #[cfg(feature = "arbitrary")]
28827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28828        use arbitrary::{Arbitrary, Unstructured};
28829        let mut buf = [0u8; 1024];
28830        rng.fill_bytes(&mut buf);
28831        let mut unstructured = Unstructured::new(&buf);
28832        Self::arbitrary(&mut unstructured).unwrap_or_default()
28833    }
28834}
28835impl Default for SUPPORTED_TUNES_DATA {
28836    fn default() -> Self {
28837        Self::DEFAULT.clone()
28838    }
28839}
28840impl MessageData for SUPPORTED_TUNES_DATA {
28841    type Message = MavMessage;
28842    const ID: u32 = 401u32;
28843    const NAME: &'static str = "SUPPORTED_TUNES";
28844    const EXTRA_CRC: u8 = 183u8;
28845    const ENCODED_LEN: usize = 6usize;
28846    fn deser(
28847        _version: MavlinkVersion,
28848        __input: &[u8],
28849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28850        let avail_len = __input.len();
28851        let mut payload_buf = [0; Self::ENCODED_LEN];
28852        let mut buf = if avail_len < Self::ENCODED_LEN {
28853            payload_buf[0..avail_len].copy_from_slice(__input);
28854            Bytes::new(&payload_buf)
28855        } else {
28856            Bytes::new(__input)
28857        };
28858        let mut __struct = Self::default();
28859        let tmp = buf.get_u32_le();
28860        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28861            ::mavlink_core::error::ParserError::InvalidEnum {
28862                enum_type: "TuneFormat",
28863                value: tmp as u32,
28864            },
28865        )?;
28866        __struct.target_system = buf.get_u8();
28867        __struct.target_component = buf.get_u8();
28868        Ok(__struct)
28869    }
28870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28871        let mut __tmp = BytesMut::new(bytes);
28872        #[allow(clippy::absurd_extreme_comparisons)]
28873        #[allow(unused_comparisons)]
28874        if __tmp.remaining() < Self::ENCODED_LEN {
28875            panic!(
28876                "buffer is too small (need {} bytes, but got {})",
28877                Self::ENCODED_LEN,
28878                __tmp.remaining(),
28879            )
28880        }
28881        __tmp.put_u32_le(self.format as u32);
28882        __tmp.put_u8(self.target_system);
28883        __tmp.put_u8(self.target_component);
28884        if matches!(version, MavlinkVersion::V2) {
28885            let len = __tmp.len();
28886            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28887        } else {
28888            __tmp.len()
28889        }
28890    }
28891}
28892#[doc = "id: 2"]
28893#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28894#[derive(Debug, Clone, PartialEq)]
28895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28897pub struct SYSTEM_TIME_DATA {
28898    #[doc = "Timestamp (UNIX epoch time)."]
28899    pub time_unix_usec: u64,
28900    #[doc = "Timestamp (time since system boot)."]
28901    pub time_boot_ms: u32,
28902}
28903impl SYSTEM_TIME_DATA {
28904    pub const ENCODED_LEN: usize = 12usize;
28905    pub const DEFAULT: Self = Self {
28906        time_unix_usec: 0_u64,
28907        time_boot_ms: 0_u32,
28908    };
28909    #[cfg(feature = "arbitrary")]
28910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28911        use arbitrary::{Arbitrary, Unstructured};
28912        let mut buf = [0u8; 1024];
28913        rng.fill_bytes(&mut buf);
28914        let mut unstructured = Unstructured::new(&buf);
28915        Self::arbitrary(&mut unstructured).unwrap_or_default()
28916    }
28917}
28918impl Default for SYSTEM_TIME_DATA {
28919    fn default() -> Self {
28920        Self::DEFAULT.clone()
28921    }
28922}
28923impl MessageData for SYSTEM_TIME_DATA {
28924    type Message = MavMessage;
28925    const ID: u32 = 2u32;
28926    const NAME: &'static str = "SYSTEM_TIME";
28927    const EXTRA_CRC: u8 = 137u8;
28928    const ENCODED_LEN: usize = 12usize;
28929    fn deser(
28930        _version: MavlinkVersion,
28931        __input: &[u8],
28932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28933        let avail_len = __input.len();
28934        let mut payload_buf = [0; Self::ENCODED_LEN];
28935        let mut buf = if avail_len < Self::ENCODED_LEN {
28936            payload_buf[0..avail_len].copy_from_slice(__input);
28937            Bytes::new(&payload_buf)
28938        } else {
28939            Bytes::new(__input)
28940        };
28941        let mut __struct = Self::default();
28942        __struct.time_unix_usec = buf.get_u64_le();
28943        __struct.time_boot_ms = buf.get_u32_le();
28944        Ok(__struct)
28945    }
28946    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28947        let mut __tmp = BytesMut::new(bytes);
28948        #[allow(clippy::absurd_extreme_comparisons)]
28949        #[allow(unused_comparisons)]
28950        if __tmp.remaining() < Self::ENCODED_LEN {
28951            panic!(
28952                "buffer is too small (need {} bytes, but got {})",
28953                Self::ENCODED_LEN,
28954                __tmp.remaining(),
28955            )
28956        }
28957        __tmp.put_u64_le(self.time_unix_usec);
28958        __tmp.put_u32_le(self.time_boot_ms);
28959        if matches!(version, MavlinkVersion::V2) {
28960            let len = __tmp.len();
28961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28962        } else {
28963            __tmp.len()
28964        }
28965    }
28966}
28967#[doc = "id: 1"]
28968#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28969#[derive(Debug, Clone, PartialEq)]
28970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28972pub struct SYS_STATUS_DATA {
28973    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28974    pub onboard_control_sensors_present: MavSysStatusSensor,
28975    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28976    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28977    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28978    pub onboard_control_sensors_health: MavSysStatusSensor,
28979    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28980    pub load: u16,
28981    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28982    pub voltage_battery: u16,
28983    #[doc = "Battery current, -1: Current not sent by autopilot"]
28984    pub current_battery: i16,
28985    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28986    pub drop_rate_comm: u16,
28987    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28988    pub errors_comm: u16,
28989    #[doc = "Autopilot-specific errors"]
28990    pub errors_count1: u16,
28991    #[doc = "Autopilot-specific errors"]
28992    pub errors_count2: u16,
28993    #[doc = "Autopilot-specific errors"]
28994    pub errors_count3: u16,
28995    #[doc = "Autopilot-specific errors"]
28996    pub errors_count4: u16,
28997    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28998    pub battery_remaining: i8,
28999    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29000    #[cfg_attr(feature = "serde", serde(default))]
29001    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29002    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29003    #[cfg_attr(feature = "serde", serde(default))]
29004    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29005    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29006    #[cfg_attr(feature = "serde", serde(default))]
29007    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29008}
29009impl SYS_STATUS_DATA {
29010    pub const ENCODED_LEN: usize = 43usize;
29011    pub const DEFAULT: Self = Self {
29012        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29013        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29014        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29015        load: 0_u16,
29016        voltage_battery: 0_u16,
29017        current_battery: 0_i16,
29018        drop_rate_comm: 0_u16,
29019        errors_comm: 0_u16,
29020        errors_count1: 0_u16,
29021        errors_count2: 0_u16,
29022        errors_count3: 0_u16,
29023        errors_count4: 0_u16,
29024        battery_remaining: 0_i8,
29025        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29026        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29027        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29028    };
29029    #[cfg(feature = "arbitrary")]
29030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29031        use arbitrary::{Arbitrary, Unstructured};
29032        let mut buf = [0u8; 1024];
29033        rng.fill_bytes(&mut buf);
29034        let mut unstructured = Unstructured::new(&buf);
29035        Self::arbitrary(&mut unstructured).unwrap_or_default()
29036    }
29037}
29038impl Default for SYS_STATUS_DATA {
29039    fn default() -> Self {
29040        Self::DEFAULT.clone()
29041    }
29042}
29043impl MessageData for SYS_STATUS_DATA {
29044    type Message = MavMessage;
29045    const ID: u32 = 1u32;
29046    const NAME: &'static str = "SYS_STATUS";
29047    const EXTRA_CRC: u8 = 124u8;
29048    const ENCODED_LEN: usize = 43usize;
29049    fn deser(
29050        _version: MavlinkVersion,
29051        __input: &[u8],
29052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29053        let avail_len = __input.len();
29054        let mut payload_buf = [0; Self::ENCODED_LEN];
29055        let mut buf = if avail_len < Self::ENCODED_LEN {
29056            payload_buf[0..avail_len].copy_from_slice(__input);
29057            Bytes::new(&payload_buf)
29058        } else {
29059            Bytes::new(__input)
29060        };
29061        let mut __struct = Self::default();
29062        let tmp = buf.get_u32_le();
29063        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
29064            tmp & MavSysStatusSensor::all().bits(),
29065        )
29066        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29067            flag_type: "MavSysStatusSensor",
29068            value: tmp as u32,
29069        })?;
29070        let tmp = buf.get_u32_le();
29071        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
29072            tmp & MavSysStatusSensor::all().bits(),
29073        )
29074        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29075            flag_type: "MavSysStatusSensor",
29076            value: tmp as u32,
29077        })?;
29078        let tmp = buf.get_u32_le();
29079        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
29080            tmp & MavSysStatusSensor::all().bits(),
29081        )
29082        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29083            flag_type: "MavSysStatusSensor",
29084            value: tmp as u32,
29085        })?;
29086        __struct.load = buf.get_u16_le();
29087        __struct.voltage_battery = buf.get_u16_le();
29088        __struct.current_battery = buf.get_i16_le();
29089        __struct.drop_rate_comm = buf.get_u16_le();
29090        __struct.errors_comm = buf.get_u16_le();
29091        __struct.errors_count1 = buf.get_u16_le();
29092        __struct.errors_count2 = buf.get_u16_le();
29093        __struct.errors_count3 = buf.get_u16_le();
29094        __struct.errors_count4 = buf.get_u16_le();
29095        __struct.battery_remaining = buf.get_i8();
29096        let tmp = buf.get_u32_le();
29097        __struct.onboard_control_sensors_present_extended =
29098            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29099                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29100                flag_type: "MavSysStatusSensorExtended",
29101                value: tmp as u32,
29102            })?;
29103        let tmp = buf.get_u32_le();
29104        __struct.onboard_control_sensors_enabled_extended =
29105            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29106                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29107                flag_type: "MavSysStatusSensorExtended",
29108                value: tmp as u32,
29109            })?;
29110        let tmp = buf.get_u32_le();
29111        __struct.onboard_control_sensors_health_extended =
29112            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
29113                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29114                flag_type: "MavSysStatusSensorExtended",
29115                value: tmp as u32,
29116            })?;
29117        Ok(__struct)
29118    }
29119    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29120        let mut __tmp = BytesMut::new(bytes);
29121        #[allow(clippy::absurd_extreme_comparisons)]
29122        #[allow(unused_comparisons)]
29123        if __tmp.remaining() < Self::ENCODED_LEN {
29124            panic!(
29125                "buffer is too small (need {} bytes, but got {})",
29126                Self::ENCODED_LEN,
29127                __tmp.remaining(),
29128            )
29129        }
29130        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29131        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29132        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29133        __tmp.put_u16_le(self.load);
29134        __tmp.put_u16_le(self.voltage_battery);
29135        __tmp.put_i16_le(self.current_battery);
29136        __tmp.put_u16_le(self.drop_rate_comm);
29137        __tmp.put_u16_le(self.errors_comm);
29138        __tmp.put_u16_le(self.errors_count1);
29139        __tmp.put_u16_le(self.errors_count2);
29140        __tmp.put_u16_le(self.errors_count3);
29141        __tmp.put_u16_le(self.errors_count4);
29142        __tmp.put_i8(self.battery_remaining);
29143        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29144        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29145        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29146        if matches!(version, MavlinkVersion::V2) {
29147            let len = __tmp.len();
29148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29149        } else {
29150            __tmp.len()
29151        }
29152    }
29153}
29154#[doc = "id: 135"]
29155#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29156#[derive(Debug, Clone, PartialEq)]
29157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29159pub struct TERRAIN_CHECK_DATA {
29160    #[doc = "Latitude"]
29161    pub lat: i32,
29162    #[doc = "Longitude"]
29163    pub lon: i32,
29164}
29165impl TERRAIN_CHECK_DATA {
29166    pub const ENCODED_LEN: usize = 8usize;
29167    pub const DEFAULT: Self = Self {
29168        lat: 0_i32,
29169        lon: 0_i32,
29170    };
29171    #[cfg(feature = "arbitrary")]
29172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29173        use arbitrary::{Arbitrary, Unstructured};
29174        let mut buf = [0u8; 1024];
29175        rng.fill_bytes(&mut buf);
29176        let mut unstructured = Unstructured::new(&buf);
29177        Self::arbitrary(&mut unstructured).unwrap_or_default()
29178    }
29179}
29180impl Default for TERRAIN_CHECK_DATA {
29181    fn default() -> Self {
29182        Self::DEFAULT.clone()
29183    }
29184}
29185impl MessageData for TERRAIN_CHECK_DATA {
29186    type Message = MavMessage;
29187    const ID: u32 = 135u32;
29188    const NAME: &'static str = "TERRAIN_CHECK";
29189    const EXTRA_CRC: u8 = 203u8;
29190    const ENCODED_LEN: usize = 8usize;
29191    fn deser(
29192        _version: MavlinkVersion,
29193        __input: &[u8],
29194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29195        let avail_len = __input.len();
29196        let mut payload_buf = [0; Self::ENCODED_LEN];
29197        let mut buf = if avail_len < Self::ENCODED_LEN {
29198            payload_buf[0..avail_len].copy_from_slice(__input);
29199            Bytes::new(&payload_buf)
29200        } else {
29201            Bytes::new(__input)
29202        };
29203        let mut __struct = Self::default();
29204        __struct.lat = buf.get_i32_le();
29205        __struct.lon = buf.get_i32_le();
29206        Ok(__struct)
29207    }
29208    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29209        let mut __tmp = BytesMut::new(bytes);
29210        #[allow(clippy::absurd_extreme_comparisons)]
29211        #[allow(unused_comparisons)]
29212        if __tmp.remaining() < Self::ENCODED_LEN {
29213            panic!(
29214                "buffer is too small (need {} bytes, but got {})",
29215                Self::ENCODED_LEN,
29216                __tmp.remaining(),
29217            )
29218        }
29219        __tmp.put_i32_le(self.lat);
29220        __tmp.put_i32_le(self.lon);
29221        if matches!(version, MavlinkVersion::V2) {
29222            let len = __tmp.len();
29223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29224        } else {
29225            __tmp.len()
29226        }
29227    }
29228}
29229#[doc = "id: 134"]
29230#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29231#[derive(Debug, Clone, PartialEq)]
29232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29234pub struct TERRAIN_DATA_DATA {
29235    #[doc = "Latitude of SW corner of first grid"]
29236    pub lat: i32,
29237    #[doc = "Longitude of SW corner of first grid"]
29238    pub lon: i32,
29239    #[doc = "Grid spacing"]
29240    pub grid_spacing: u16,
29241    #[doc = "Terrain data MSL"]
29242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29243    pub data: [i16; 16],
29244    #[doc = "bit within the terrain request mask"]
29245    pub gridbit: u8,
29246}
29247impl TERRAIN_DATA_DATA {
29248    pub const ENCODED_LEN: usize = 43usize;
29249    pub const DEFAULT: Self = Self {
29250        lat: 0_i32,
29251        lon: 0_i32,
29252        grid_spacing: 0_u16,
29253        data: [0_i16; 16usize],
29254        gridbit: 0_u8,
29255    };
29256    #[cfg(feature = "arbitrary")]
29257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29258        use arbitrary::{Arbitrary, Unstructured};
29259        let mut buf = [0u8; 1024];
29260        rng.fill_bytes(&mut buf);
29261        let mut unstructured = Unstructured::new(&buf);
29262        Self::arbitrary(&mut unstructured).unwrap_or_default()
29263    }
29264}
29265impl Default for TERRAIN_DATA_DATA {
29266    fn default() -> Self {
29267        Self::DEFAULT.clone()
29268    }
29269}
29270impl MessageData for TERRAIN_DATA_DATA {
29271    type Message = MavMessage;
29272    const ID: u32 = 134u32;
29273    const NAME: &'static str = "TERRAIN_DATA";
29274    const EXTRA_CRC: u8 = 229u8;
29275    const ENCODED_LEN: usize = 43usize;
29276    fn deser(
29277        _version: MavlinkVersion,
29278        __input: &[u8],
29279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29280        let avail_len = __input.len();
29281        let mut payload_buf = [0; Self::ENCODED_LEN];
29282        let mut buf = if avail_len < Self::ENCODED_LEN {
29283            payload_buf[0..avail_len].copy_from_slice(__input);
29284            Bytes::new(&payload_buf)
29285        } else {
29286            Bytes::new(__input)
29287        };
29288        let mut __struct = Self::default();
29289        __struct.lat = buf.get_i32_le();
29290        __struct.lon = buf.get_i32_le();
29291        __struct.grid_spacing = buf.get_u16_le();
29292        for v in &mut __struct.data {
29293            let val = buf.get_i16_le();
29294            *v = val;
29295        }
29296        __struct.gridbit = buf.get_u8();
29297        Ok(__struct)
29298    }
29299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29300        let mut __tmp = BytesMut::new(bytes);
29301        #[allow(clippy::absurd_extreme_comparisons)]
29302        #[allow(unused_comparisons)]
29303        if __tmp.remaining() < Self::ENCODED_LEN {
29304            panic!(
29305                "buffer is too small (need {} bytes, but got {})",
29306                Self::ENCODED_LEN,
29307                __tmp.remaining(),
29308            )
29309        }
29310        __tmp.put_i32_le(self.lat);
29311        __tmp.put_i32_le(self.lon);
29312        __tmp.put_u16_le(self.grid_spacing);
29313        for val in &self.data {
29314            __tmp.put_i16_le(*val);
29315        }
29316        __tmp.put_u8(self.gridbit);
29317        if matches!(version, MavlinkVersion::V2) {
29318            let len = __tmp.len();
29319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29320        } else {
29321            __tmp.len()
29322        }
29323    }
29324}
29325#[doc = "id: 136"]
29326#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29327#[derive(Debug, Clone, PartialEq)]
29328#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29329#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29330pub struct TERRAIN_REPORT_DATA {
29331    #[doc = "Latitude"]
29332    pub lat: i32,
29333    #[doc = "Longitude"]
29334    pub lon: i32,
29335    #[doc = "Terrain height MSL"]
29336    pub terrain_height: f32,
29337    #[doc = "Current vehicle height above lat/lon terrain height"]
29338    pub current_height: f32,
29339    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29340    pub spacing: u16,
29341    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29342    pub pending: u16,
29343    #[doc = "Number of 4x4 terrain blocks in memory"]
29344    pub loaded: u16,
29345}
29346impl TERRAIN_REPORT_DATA {
29347    pub const ENCODED_LEN: usize = 22usize;
29348    pub const DEFAULT: Self = Self {
29349        lat: 0_i32,
29350        lon: 0_i32,
29351        terrain_height: 0.0_f32,
29352        current_height: 0.0_f32,
29353        spacing: 0_u16,
29354        pending: 0_u16,
29355        loaded: 0_u16,
29356    };
29357    #[cfg(feature = "arbitrary")]
29358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29359        use arbitrary::{Arbitrary, Unstructured};
29360        let mut buf = [0u8; 1024];
29361        rng.fill_bytes(&mut buf);
29362        let mut unstructured = Unstructured::new(&buf);
29363        Self::arbitrary(&mut unstructured).unwrap_or_default()
29364    }
29365}
29366impl Default for TERRAIN_REPORT_DATA {
29367    fn default() -> Self {
29368        Self::DEFAULT.clone()
29369    }
29370}
29371impl MessageData for TERRAIN_REPORT_DATA {
29372    type Message = MavMessage;
29373    const ID: u32 = 136u32;
29374    const NAME: &'static str = "TERRAIN_REPORT";
29375    const EXTRA_CRC: u8 = 1u8;
29376    const ENCODED_LEN: usize = 22usize;
29377    fn deser(
29378        _version: MavlinkVersion,
29379        __input: &[u8],
29380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29381        let avail_len = __input.len();
29382        let mut payload_buf = [0; Self::ENCODED_LEN];
29383        let mut buf = if avail_len < Self::ENCODED_LEN {
29384            payload_buf[0..avail_len].copy_from_slice(__input);
29385            Bytes::new(&payload_buf)
29386        } else {
29387            Bytes::new(__input)
29388        };
29389        let mut __struct = Self::default();
29390        __struct.lat = buf.get_i32_le();
29391        __struct.lon = buf.get_i32_le();
29392        __struct.terrain_height = buf.get_f32_le();
29393        __struct.current_height = buf.get_f32_le();
29394        __struct.spacing = buf.get_u16_le();
29395        __struct.pending = buf.get_u16_le();
29396        __struct.loaded = buf.get_u16_le();
29397        Ok(__struct)
29398    }
29399    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29400        let mut __tmp = BytesMut::new(bytes);
29401        #[allow(clippy::absurd_extreme_comparisons)]
29402        #[allow(unused_comparisons)]
29403        if __tmp.remaining() < Self::ENCODED_LEN {
29404            panic!(
29405                "buffer is too small (need {} bytes, but got {})",
29406                Self::ENCODED_LEN,
29407                __tmp.remaining(),
29408            )
29409        }
29410        __tmp.put_i32_le(self.lat);
29411        __tmp.put_i32_le(self.lon);
29412        __tmp.put_f32_le(self.terrain_height);
29413        __tmp.put_f32_le(self.current_height);
29414        __tmp.put_u16_le(self.spacing);
29415        __tmp.put_u16_le(self.pending);
29416        __tmp.put_u16_le(self.loaded);
29417        if matches!(version, MavlinkVersion::V2) {
29418            let len = __tmp.len();
29419            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29420        } else {
29421            __tmp.len()
29422        }
29423    }
29424}
29425#[doc = "id: 133"]
29426#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29427#[derive(Debug, Clone, PartialEq)]
29428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29430pub struct TERRAIN_REQUEST_DATA {
29431    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
29432    pub mask: u64,
29433    #[doc = "Latitude of SW corner of first grid"]
29434    pub lat: i32,
29435    #[doc = "Longitude of SW corner of first grid"]
29436    pub lon: i32,
29437    #[doc = "Grid spacing"]
29438    pub grid_spacing: u16,
29439}
29440impl TERRAIN_REQUEST_DATA {
29441    pub const ENCODED_LEN: usize = 18usize;
29442    pub const DEFAULT: Self = Self {
29443        mask: 0_u64,
29444        lat: 0_i32,
29445        lon: 0_i32,
29446        grid_spacing: 0_u16,
29447    };
29448    #[cfg(feature = "arbitrary")]
29449    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29450        use arbitrary::{Arbitrary, Unstructured};
29451        let mut buf = [0u8; 1024];
29452        rng.fill_bytes(&mut buf);
29453        let mut unstructured = Unstructured::new(&buf);
29454        Self::arbitrary(&mut unstructured).unwrap_or_default()
29455    }
29456}
29457impl Default for TERRAIN_REQUEST_DATA {
29458    fn default() -> Self {
29459        Self::DEFAULT.clone()
29460    }
29461}
29462impl MessageData for TERRAIN_REQUEST_DATA {
29463    type Message = MavMessage;
29464    const ID: u32 = 133u32;
29465    const NAME: &'static str = "TERRAIN_REQUEST";
29466    const EXTRA_CRC: u8 = 6u8;
29467    const ENCODED_LEN: usize = 18usize;
29468    fn deser(
29469        _version: MavlinkVersion,
29470        __input: &[u8],
29471    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29472        let avail_len = __input.len();
29473        let mut payload_buf = [0; Self::ENCODED_LEN];
29474        let mut buf = if avail_len < Self::ENCODED_LEN {
29475            payload_buf[0..avail_len].copy_from_slice(__input);
29476            Bytes::new(&payload_buf)
29477        } else {
29478            Bytes::new(__input)
29479        };
29480        let mut __struct = Self::default();
29481        __struct.mask = buf.get_u64_le();
29482        __struct.lat = buf.get_i32_le();
29483        __struct.lon = buf.get_i32_le();
29484        __struct.grid_spacing = buf.get_u16_le();
29485        Ok(__struct)
29486    }
29487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29488        let mut __tmp = BytesMut::new(bytes);
29489        #[allow(clippy::absurd_extreme_comparisons)]
29490        #[allow(unused_comparisons)]
29491        if __tmp.remaining() < Self::ENCODED_LEN {
29492            panic!(
29493                "buffer is too small (need {} bytes, but got {})",
29494                Self::ENCODED_LEN,
29495                __tmp.remaining(),
29496            )
29497        }
29498        __tmp.put_u64_le(self.mask);
29499        __tmp.put_i32_le(self.lat);
29500        __tmp.put_i32_le(self.lon);
29501        __tmp.put_u16_le(self.grid_spacing);
29502        if matches!(version, MavlinkVersion::V2) {
29503            let len = __tmp.len();
29504            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29505        } else {
29506            __tmp.len()
29507        }
29508    }
29509}
29510#[doc = "id: 111"]
29511#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29512#[derive(Debug, Clone, PartialEq)]
29513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29515pub struct TIMESYNC_DATA {
29516    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29517    pub tc1: i64,
29518    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29519    pub ts1: i64,
29520    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29522    pub target_system: u8,
29523    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29525    pub target_component: u8,
29526}
29527impl TIMESYNC_DATA {
29528    pub const ENCODED_LEN: usize = 18usize;
29529    pub const DEFAULT: Self = Self {
29530        tc1: 0_i64,
29531        ts1: 0_i64,
29532        target_system: 0_u8,
29533        target_component: 0_u8,
29534    };
29535    #[cfg(feature = "arbitrary")]
29536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29537        use arbitrary::{Arbitrary, Unstructured};
29538        let mut buf = [0u8; 1024];
29539        rng.fill_bytes(&mut buf);
29540        let mut unstructured = Unstructured::new(&buf);
29541        Self::arbitrary(&mut unstructured).unwrap_or_default()
29542    }
29543}
29544impl Default for TIMESYNC_DATA {
29545    fn default() -> Self {
29546        Self::DEFAULT.clone()
29547    }
29548}
29549impl MessageData for TIMESYNC_DATA {
29550    type Message = MavMessage;
29551    const ID: u32 = 111u32;
29552    const NAME: &'static str = "TIMESYNC";
29553    const EXTRA_CRC: u8 = 34u8;
29554    const ENCODED_LEN: usize = 18usize;
29555    fn deser(
29556        _version: MavlinkVersion,
29557        __input: &[u8],
29558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29559        let avail_len = __input.len();
29560        let mut payload_buf = [0; Self::ENCODED_LEN];
29561        let mut buf = if avail_len < Self::ENCODED_LEN {
29562            payload_buf[0..avail_len].copy_from_slice(__input);
29563            Bytes::new(&payload_buf)
29564        } else {
29565            Bytes::new(__input)
29566        };
29567        let mut __struct = Self::default();
29568        __struct.tc1 = buf.get_i64_le();
29569        __struct.ts1 = buf.get_i64_le();
29570        __struct.target_system = buf.get_u8();
29571        __struct.target_component = buf.get_u8();
29572        Ok(__struct)
29573    }
29574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29575        let mut __tmp = BytesMut::new(bytes);
29576        #[allow(clippy::absurd_extreme_comparisons)]
29577        #[allow(unused_comparisons)]
29578        if __tmp.remaining() < Self::ENCODED_LEN {
29579            panic!(
29580                "buffer is too small (need {} bytes, but got {})",
29581                Self::ENCODED_LEN,
29582                __tmp.remaining(),
29583            )
29584        }
29585        __tmp.put_i64_le(self.tc1);
29586        __tmp.put_i64_le(self.ts1);
29587        __tmp.put_u8(self.target_system);
29588        __tmp.put_u8(self.target_component);
29589        if matches!(version, MavlinkVersion::V2) {
29590            let len = __tmp.len();
29591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29592        } else {
29593            __tmp.len()
29594        }
29595    }
29596}
29597#[doc = "id: 380"]
29598#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29599#[derive(Debug, Clone, PartialEq)]
29600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29602pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29603    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29604    pub safe_return: i32,
29605    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29606    pub land: i32,
29607    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29608    pub mission_next_item: i32,
29609    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29610    pub mission_end: i32,
29611    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29612    pub commanded_action: i32,
29613}
29614impl TIME_ESTIMATE_TO_TARGET_DATA {
29615    pub const ENCODED_LEN: usize = 20usize;
29616    pub const DEFAULT: Self = Self {
29617        safe_return: 0_i32,
29618        land: 0_i32,
29619        mission_next_item: 0_i32,
29620        mission_end: 0_i32,
29621        commanded_action: 0_i32,
29622    };
29623    #[cfg(feature = "arbitrary")]
29624    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29625        use arbitrary::{Arbitrary, Unstructured};
29626        let mut buf = [0u8; 1024];
29627        rng.fill_bytes(&mut buf);
29628        let mut unstructured = Unstructured::new(&buf);
29629        Self::arbitrary(&mut unstructured).unwrap_or_default()
29630    }
29631}
29632impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29633    fn default() -> Self {
29634        Self::DEFAULT.clone()
29635    }
29636}
29637impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29638    type Message = MavMessage;
29639    const ID: u32 = 380u32;
29640    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29641    const EXTRA_CRC: u8 = 232u8;
29642    const ENCODED_LEN: usize = 20usize;
29643    fn deser(
29644        _version: MavlinkVersion,
29645        __input: &[u8],
29646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29647        let avail_len = __input.len();
29648        let mut payload_buf = [0; Self::ENCODED_LEN];
29649        let mut buf = if avail_len < Self::ENCODED_LEN {
29650            payload_buf[0..avail_len].copy_from_slice(__input);
29651            Bytes::new(&payload_buf)
29652        } else {
29653            Bytes::new(__input)
29654        };
29655        let mut __struct = Self::default();
29656        __struct.safe_return = buf.get_i32_le();
29657        __struct.land = buf.get_i32_le();
29658        __struct.mission_next_item = buf.get_i32_le();
29659        __struct.mission_end = buf.get_i32_le();
29660        __struct.commanded_action = buf.get_i32_le();
29661        Ok(__struct)
29662    }
29663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29664        let mut __tmp = BytesMut::new(bytes);
29665        #[allow(clippy::absurd_extreme_comparisons)]
29666        #[allow(unused_comparisons)]
29667        if __tmp.remaining() < Self::ENCODED_LEN {
29668            panic!(
29669                "buffer is too small (need {} bytes, but got {})",
29670                Self::ENCODED_LEN,
29671                __tmp.remaining(),
29672            )
29673        }
29674        __tmp.put_i32_le(self.safe_return);
29675        __tmp.put_i32_le(self.land);
29676        __tmp.put_i32_le(self.mission_next_item);
29677        __tmp.put_i32_le(self.mission_end);
29678        __tmp.put_i32_le(self.commanded_action);
29679        if matches!(version, MavlinkVersion::V2) {
29680            let len = __tmp.len();
29681            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29682        } else {
29683            __tmp.len()
29684        }
29685    }
29686}
29687#[doc = "id: 333"]
29688#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29689#[derive(Debug, Clone, PartialEq)]
29690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29692pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29693    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29694    pub time_usec: u64,
29695    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29697    pub pos_x: [f32; 5],
29698    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29700    pub pos_y: [f32; 5],
29701    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29703    pub pos_z: [f32; 5],
29704    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29706    pub delta: [f32; 5],
29707    #[doc = "Yaw. Set to NaN for unchanged"]
29708    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29709    pub pos_yaw: [f32; 5],
29710    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29711    pub valid_points: u8,
29712}
29713impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29714    pub const ENCODED_LEN: usize = 109usize;
29715    pub const DEFAULT: Self = Self {
29716        time_usec: 0_u64,
29717        pos_x: [0.0_f32; 5usize],
29718        pos_y: [0.0_f32; 5usize],
29719        pos_z: [0.0_f32; 5usize],
29720        delta: [0.0_f32; 5usize],
29721        pos_yaw: [0.0_f32; 5usize],
29722        valid_points: 0_u8,
29723    };
29724    #[cfg(feature = "arbitrary")]
29725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29726        use arbitrary::{Arbitrary, Unstructured};
29727        let mut buf = [0u8; 1024];
29728        rng.fill_bytes(&mut buf);
29729        let mut unstructured = Unstructured::new(&buf);
29730        Self::arbitrary(&mut unstructured).unwrap_or_default()
29731    }
29732}
29733impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29734    fn default() -> Self {
29735        Self::DEFAULT.clone()
29736    }
29737}
29738impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29739    type Message = MavMessage;
29740    const ID: u32 = 333u32;
29741    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29742    const EXTRA_CRC: u8 = 231u8;
29743    const ENCODED_LEN: usize = 109usize;
29744    fn deser(
29745        _version: MavlinkVersion,
29746        __input: &[u8],
29747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29748        let avail_len = __input.len();
29749        let mut payload_buf = [0; Self::ENCODED_LEN];
29750        let mut buf = if avail_len < Self::ENCODED_LEN {
29751            payload_buf[0..avail_len].copy_from_slice(__input);
29752            Bytes::new(&payload_buf)
29753        } else {
29754            Bytes::new(__input)
29755        };
29756        let mut __struct = Self::default();
29757        __struct.time_usec = buf.get_u64_le();
29758        for v in &mut __struct.pos_x {
29759            let val = buf.get_f32_le();
29760            *v = val;
29761        }
29762        for v in &mut __struct.pos_y {
29763            let val = buf.get_f32_le();
29764            *v = val;
29765        }
29766        for v in &mut __struct.pos_z {
29767            let val = buf.get_f32_le();
29768            *v = val;
29769        }
29770        for v in &mut __struct.delta {
29771            let val = buf.get_f32_le();
29772            *v = val;
29773        }
29774        for v in &mut __struct.pos_yaw {
29775            let val = buf.get_f32_le();
29776            *v = val;
29777        }
29778        __struct.valid_points = buf.get_u8();
29779        Ok(__struct)
29780    }
29781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29782        let mut __tmp = BytesMut::new(bytes);
29783        #[allow(clippy::absurd_extreme_comparisons)]
29784        #[allow(unused_comparisons)]
29785        if __tmp.remaining() < Self::ENCODED_LEN {
29786            panic!(
29787                "buffer is too small (need {} bytes, but got {})",
29788                Self::ENCODED_LEN,
29789                __tmp.remaining(),
29790            )
29791        }
29792        __tmp.put_u64_le(self.time_usec);
29793        for val in &self.pos_x {
29794            __tmp.put_f32_le(*val);
29795        }
29796        for val in &self.pos_y {
29797            __tmp.put_f32_le(*val);
29798        }
29799        for val in &self.pos_z {
29800            __tmp.put_f32_le(*val);
29801        }
29802        for val in &self.delta {
29803            __tmp.put_f32_le(*val);
29804        }
29805        for val in &self.pos_yaw {
29806            __tmp.put_f32_le(*val);
29807        }
29808        __tmp.put_u8(self.valid_points);
29809        if matches!(version, MavlinkVersion::V2) {
29810            let len = __tmp.len();
29811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29812        } else {
29813            __tmp.len()
29814        }
29815    }
29816}
29817#[doc = "id: 332"]
29818#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29819#[derive(Debug, Clone, PartialEq)]
29820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29822pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29823    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29824    pub time_usec: u64,
29825    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29827    pub pos_x: [f32; 5],
29828    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29830    pub pos_y: [f32; 5],
29831    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29832    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29833    pub pos_z: [f32; 5],
29834    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29835    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29836    pub vel_x: [f32; 5],
29837    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
29838    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29839    pub vel_y: [f32; 5],
29840    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
29841    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29842    pub vel_z: [f32; 5],
29843    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
29844    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29845    pub acc_x: [f32; 5],
29846    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
29847    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29848    pub acc_y: [f32; 5],
29849    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
29850    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29851    pub acc_z: [f32; 5],
29852    #[doc = "Yaw angle, set to NaN if not being used"]
29853    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29854    pub pos_yaw: [f32; 5],
29855    #[doc = "Yaw rate, set to NaN if not being used"]
29856    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29857    pub vel_yaw: [f32; 5],
29858    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
29859    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29860    pub command: [u16; 5],
29861    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
29862    pub valid_points: u8,
29863}
29864impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29865    pub const ENCODED_LEN: usize = 239usize;
29866    pub const DEFAULT: Self = Self {
29867        time_usec: 0_u64,
29868        pos_x: [0.0_f32; 5usize],
29869        pos_y: [0.0_f32; 5usize],
29870        pos_z: [0.0_f32; 5usize],
29871        vel_x: [0.0_f32; 5usize],
29872        vel_y: [0.0_f32; 5usize],
29873        vel_z: [0.0_f32; 5usize],
29874        acc_x: [0.0_f32; 5usize],
29875        acc_y: [0.0_f32; 5usize],
29876        acc_z: [0.0_f32; 5usize],
29877        pos_yaw: [0.0_f32; 5usize],
29878        vel_yaw: [0.0_f32; 5usize],
29879        command: [0_u16; 5usize],
29880        valid_points: 0_u8,
29881    };
29882    #[cfg(feature = "arbitrary")]
29883    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29884        use arbitrary::{Arbitrary, Unstructured};
29885        let mut buf = [0u8; 1024];
29886        rng.fill_bytes(&mut buf);
29887        let mut unstructured = Unstructured::new(&buf);
29888        Self::arbitrary(&mut unstructured).unwrap_or_default()
29889    }
29890}
29891impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29892    fn default() -> Self {
29893        Self::DEFAULT.clone()
29894    }
29895}
29896impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29897    type Message = MavMessage;
29898    const ID: u32 = 332u32;
29899    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
29900    const EXTRA_CRC: u8 = 236u8;
29901    const ENCODED_LEN: usize = 239usize;
29902    fn deser(
29903        _version: MavlinkVersion,
29904        __input: &[u8],
29905    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29906        let avail_len = __input.len();
29907        let mut payload_buf = [0; Self::ENCODED_LEN];
29908        let mut buf = if avail_len < Self::ENCODED_LEN {
29909            payload_buf[0..avail_len].copy_from_slice(__input);
29910            Bytes::new(&payload_buf)
29911        } else {
29912            Bytes::new(__input)
29913        };
29914        let mut __struct = Self::default();
29915        __struct.time_usec = buf.get_u64_le();
29916        for v in &mut __struct.pos_x {
29917            let val = buf.get_f32_le();
29918            *v = val;
29919        }
29920        for v in &mut __struct.pos_y {
29921            let val = buf.get_f32_le();
29922            *v = val;
29923        }
29924        for v in &mut __struct.pos_z {
29925            let val = buf.get_f32_le();
29926            *v = val;
29927        }
29928        for v in &mut __struct.vel_x {
29929            let val = buf.get_f32_le();
29930            *v = val;
29931        }
29932        for v in &mut __struct.vel_y {
29933            let val = buf.get_f32_le();
29934            *v = val;
29935        }
29936        for v in &mut __struct.vel_z {
29937            let val = buf.get_f32_le();
29938            *v = val;
29939        }
29940        for v in &mut __struct.acc_x {
29941            let val = buf.get_f32_le();
29942            *v = val;
29943        }
29944        for v in &mut __struct.acc_y {
29945            let val = buf.get_f32_le();
29946            *v = val;
29947        }
29948        for v in &mut __struct.acc_z {
29949            let val = buf.get_f32_le();
29950            *v = val;
29951        }
29952        for v in &mut __struct.pos_yaw {
29953            let val = buf.get_f32_le();
29954            *v = val;
29955        }
29956        for v in &mut __struct.vel_yaw {
29957            let val = buf.get_f32_le();
29958            *v = val;
29959        }
29960        for v in &mut __struct.command {
29961            let val = buf.get_u16_le();
29962            *v = val;
29963        }
29964        __struct.valid_points = buf.get_u8();
29965        Ok(__struct)
29966    }
29967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29968        let mut __tmp = BytesMut::new(bytes);
29969        #[allow(clippy::absurd_extreme_comparisons)]
29970        #[allow(unused_comparisons)]
29971        if __tmp.remaining() < Self::ENCODED_LEN {
29972            panic!(
29973                "buffer is too small (need {} bytes, but got {})",
29974                Self::ENCODED_LEN,
29975                __tmp.remaining(),
29976            )
29977        }
29978        __tmp.put_u64_le(self.time_usec);
29979        for val in &self.pos_x {
29980            __tmp.put_f32_le(*val);
29981        }
29982        for val in &self.pos_y {
29983            __tmp.put_f32_le(*val);
29984        }
29985        for val in &self.pos_z {
29986            __tmp.put_f32_le(*val);
29987        }
29988        for val in &self.vel_x {
29989            __tmp.put_f32_le(*val);
29990        }
29991        for val in &self.vel_y {
29992            __tmp.put_f32_le(*val);
29993        }
29994        for val in &self.vel_z {
29995            __tmp.put_f32_le(*val);
29996        }
29997        for val in &self.acc_x {
29998            __tmp.put_f32_le(*val);
29999        }
30000        for val in &self.acc_y {
30001            __tmp.put_f32_le(*val);
30002        }
30003        for val in &self.acc_z {
30004            __tmp.put_f32_le(*val);
30005        }
30006        for val in &self.pos_yaw {
30007            __tmp.put_f32_le(*val);
30008        }
30009        for val in &self.vel_yaw {
30010            __tmp.put_f32_le(*val);
30011        }
30012        for val in &self.command {
30013            __tmp.put_u16_le(*val);
30014        }
30015        __tmp.put_u8(self.valid_points);
30016        if matches!(version, MavlinkVersion::V2) {
30017            let len = __tmp.len();
30018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30019        } else {
30020            __tmp.len()
30021        }
30022    }
30023}
30024#[doc = "id: 385"]
30025#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30026#[derive(Debug, Clone, PartialEq)]
30027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30029pub struct TUNNEL_DATA {
30030    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30031    pub payload_type: MavTunnelPayloadType,
30032    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30033    pub target_system: u8,
30034    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30035    pub target_component: u8,
30036    #[doc = "Length of the data transported in payload"]
30037    pub payload_length: u8,
30038    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30039    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30040    pub payload: [u8; 128],
30041}
30042impl TUNNEL_DATA {
30043    pub const ENCODED_LEN: usize = 133usize;
30044    pub const DEFAULT: Self = Self {
30045        payload_type: MavTunnelPayloadType::DEFAULT,
30046        target_system: 0_u8,
30047        target_component: 0_u8,
30048        payload_length: 0_u8,
30049        payload: [0_u8; 128usize],
30050    };
30051    #[cfg(feature = "arbitrary")]
30052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30053        use arbitrary::{Arbitrary, Unstructured};
30054        let mut buf = [0u8; 1024];
30055        rng.fill_bytes(&mut buf);
30056        let mut unstructured = Unstructured::new(&buf);
30057        Self::arbitrary(&mut unstructured).unwrap_or_default()
30058    }
30059}
30060impl Default for TUNNEL_DATA {
30061    fn default() -> Self {
30062        Self::DEFAULT.clone()
30063    }
30064}
30065impl MessageData for TUNNEL_DATA {
30066    type Message = MavMessage;
30067    const ID: u32 = 385u32;
30068    const NAME: &'static str = "TUNNEL";
30069    const EXTRA_CRC: u8 = 147u8;
30070    const ENCODED_LEN: usize = 133usize;
30071    fn deser(
30072        _version: MavlinkVersion,
30073        __input: &[u8],
30074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30075        let avail_len = __input.len();
30076        let mut payload_buf = [0; Self::ENCODED_LEN];
30077        let mut buf = if avail_len < Self::ENCODED_LEN {
30078            payload_buf[0..avail_len].copy_from_slice(__input);
30079            Bytes::new(&payload_buf)
30080        } else {
30081            Bytes::new(__input)
30082        };
30083        let mut __struct = Self::default();
30084        let tmp = buf.get_u16_le();
30085        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30086            ::mavlink_core::error::ParserError::InvalidEnum {
30087                enum_type: "MavTunnelPayloadType",
30088                value: tmp as u32,
30089            },
30090        )?;
30091        __struct.target_system = buf.get_u8();
30092        __struct.target_component = buf.get_u8();
30093        __struct.payload_length = buf.get_u8();
30094        for v in &mut __struct.payload {
30095            let val = buf.get_u8();
30096            *v = val;
30097        }
30098        Ok(__struct)
30099    }
30100    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30101        let mut __tmp = BytesMut::new(bytes);
30102        #[allow(clippy::absurd_extreme_comparisons)]
30103        #[allow(unused_comparisons)]
30104        if __tmp.remaining() < Self::ENCODED_LEN {
30105            panic!(
30106                "buffer is too small (need {} bytes, but got {})",
30107                Self::ENCODED_LEN,
30108                __tmp.remaining(),
30109            )
30110        }
30111        __tmp.put_u16_le(self.payload_type as u16);
30112        __tmp.put_u8(self.target_system);
30113        __tmp.put_u8(self.target_component);
30114        __tmp.put_u8(self.payload_length);
30115        for val in &self.payload {
30116            __tmp.put_u8(*val);
30117        }
30118        if matches!(version, MavlinkVersion::V2) {
30119            let len = __tmp.len();
30120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30121        } else {
30122            __tmp.len()
30123        }
30124    }
30125}
30126#[doc = "id: 311"]
30127#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30128#[derive(Debug, Clone, PartialEq)]
30129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30131pub struct UAVCAN_NODE_INFO_DATA {
30132    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30133    pub time_usec: u64,
30134    #[doc = "Time since the start-up of the node."]
30135    pub uptime_sec: u32,
30136    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30137    pub sw_vcs_commit: u32,
30138    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30139    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30140    pub name: [u8; 80],
30141    #[doc = "Hardware major version number."]
30142    pub hw_version_major: u8,
30143    #[doc = "Hardware minor version number."]
30144    pub hw_version_minor: u8,
30145    #[doc = "Hardware unique 128-bit ID."]
30146    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30147    pub hw_unique_id: [u8; 16],
30148    #[doc = "Software major version number."]
30149    pub sw_version_major: u8,
30150    #[doc = "Software minor version number."]
30151    pub sw_version_minor: u8,
30152}
30153impl UAVCAN_NODE_INFO_DATA {
30154    pub const ENCODED_LEN: usize = 116usize;
30155    pub const DEFAULT: Self = Self {
30156        time_usec: 0_u64,
30157        uptime_sec: 0_u32,
30158        sw_vcs_commit: 0_u32,
30159        name: [0_u8; 80usize],
30160        hw_version_major: 0_u8,
30161        hw_version_minor: 0_u8,
30162        hw_unique_id: [0_u8; 16usize],
30163        sw_version_major: 0_u8,
30164        sw_version_minor: 0_u8,
30165    };
30166    #[cfg(feature = "arbitrary")]
30167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30168        use arbitrary::{Arbitrary, Unstructured};
30169        let mut buf = [0u8; 1024];
30170        rng.fill_bytes(&mut buf);
30171        let mut unstructured = Unstructured::new(&buf);
30172        Self::arbitrary(&mut unstructured).unwrap_or_default()
30173    }
30174}
30175impl Default for UAVCAN_NODE_INFO_DATA {
30176    fn default() -> Self {
30177        Self::DEFAULT.clone()
30178    }
30179}
30180impl MessageData for UAVCAN_NODE_INFO_DATA {
30181    type Message = MavMessage;
30182    const ID: u32 = 311u32;
30183    const NAME: &'static str = "UAVCAN_NODE_INFO";
30184    const EXTRA_CRC: u8 = 95u8;
30185    const ENCODED_LEN: usize = 116usize;
30186    fn deser(
30187        _version: MavlinkVersion,
30188        __input: &[u8],
30189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30190        let avail_len = __input.len();
30191        let mut payload_buf = [0; Self::ENCODED_LEN];
30192        let mut buf = if avail_len < Self::ENCODED_LEN {
30193            payload_buf[0..avail_len].copy_from_slice(__input);
30194            Bytes::new(&payload_buf)
30195        } else {
30196            Bytes::new(__input)
30197        };
30198        let mut __struct = Self::default();
30199        __struct.time_usec = buf.get_u64_le();
30200        __struct.uptime_sec = buf.get_u32_le();
30201        __struct.sw_vcs_commit = buf.get_u32_le();
30202        for v in &mut __struct.name {
30203            let val = buf.get_u8();
30204            *v = val;
30205        }
30206        __struct.hw_version_major = buf.get_u8();
30207        __struct.hw_version_minor = buf.get_u8();
30208        for v in &mut __struct.hw_unique_id {
30209            let val = buf.get_u8();
30210            *v = val;
30211        }
30212        __struct.sw_version_major = buf.get_u8();
30213        __struct.sw_version_minor = buf.get_u8();
30214        Ok(__struct)
30215    }
30216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30217        let mut __tmp = BytesMut::new(bytes);
30218        #[allow(clippy::absurd_extreme_comparisons)]
30219        #[allow(unused_comparisons)]
30220        if __tmp.remaining() < Self::ENCODED_LEN {
30221            panic!(
30222                "buffer is too small (need {} bytes, but got {})",
30223                Self::ENCODED_LEN,
30224                __tmp.remaining(),
30225            )
30226        }
30227        __tmp.put_u64_le(self.time_usec);
30228        __tmp.put_u32_le(self.uptime_sec);
30229        __tmp.put_u32_le(self.sw_vcs_commit);
30230        for val in &self.name {
30231            __tmp.put_u8(*val);
30232        }
30233        __tmp.put_u8(self.hw_version_major);
30234        __tmp.put_u8(self.hw_version_minor);
30235        for val in &self.hw_unique_id {
30236            __tmp.put_u8(*val);
30237        }
30238        __tmp.put_u8(self.sw_version_major);
30239        __tmp.put_u8(self.sw_version_minor);
30240        if matches!(version, MavlinkVersion::V2) {
30241            let len = __tmp.len();
30242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30243        } else {
30244            __tmp.len()
30245        }
30246    }
30247}
30248#[doc = "id: 310"]
30249#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30250#[derive(Debug, Clone, PartialEq)]
30251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30252#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30253pub struct UAVCAN_NODE_STATUS_DATA {
30254    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30255    pub time_usec: u64,
30256    #[doc = "Time since the start-up of the node."]
30257    pub uptime_sec: u32,
30258    #[doc = "Vendor-specific status information."]
30259    pub vendor_specific_status_code: u16,
30260    #[doc = "Generalized node health status."]
30261    pub health: UavcanNodeHealth,
30262    #[doc = "Generalized operating mode."]
30263    pub mode: UavcanNodeMode,
30264    #[doc = "Not used currently."]
30265    pub sub_mode: u8,
30266}
30267impl UAVCAN_NODE_STATUS_DATA {
30268    pub const ENCODED_LEN: usize = 17usize;
30269    pub const DEFAULT: Self = Self {
30270        time_usec: 0_u64,
30271        uptime_sec: 0_u32,
30272        vendor_specific_status_code: 0_u16,
30273        health: UavcanNodeHealth::DEFAULT,
30274        mode: UavcanNodeMode::DEFAULT,
30275        sub_mode: 0_u8,
30276    };
30277    #[cfg(feature = "arbitrary")]
30278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30279        use arbitrary::{Arbitrary, Unstructured};
30280        let mut buf = [0u8; 1024];
30281        rng.fill_bytes(&mut buf);
30282        let mut unstructured = Unstructured::new(&buf);
30283        Self::arbitrary(&mut unstructured).unwrap_or_default()
30284    }
30285}
30286impl Default for UAVCAN_NODE_STATUS_DATA {
30287    fn default() -> Self {
30288        Self::DEFAULT.clone()
30289    }
30290}
30291impl MessageData for UAVCAN_NODE_STATUS_DATA {
30292    type Message = MavMessage;
30293    const ID: u32 = 310u32;
30294    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30295    const EXTRA_CRC: u8 = 28u8;
30296    const ENCODED_LEN: usize = 17usize;
30297    fn deser(
30298        _version: MavlinkVersion,
30299        __input: &[u8],
30300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30301        let avail_len = __input.len();
30302        let mut payload_buf = [0; Self::ENCODED_LEN];
30303        let mut buf = if avail_len < Self::ENCODED_LEN {
30304            payload_buf[0..avail_len].copy_from_slice(__input);
30305            Bytes::new(&payload_buf)
30306        } else {
30307            Bytes::new(__input)
30308        };
30309        let mut __struct = Self::default();
30310        __struct.time_usec = buf.get_u64_le();
30311        __struct.uptime_sec = buf.get_u32_le();
30312        __struct.vendor_specific_status_code = buf.get_u16_le();
30313        let tmp = buf.get_u8();
30314        __struct.health =
30315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30316                enum_type: "UavcanNodeHealth",
30317                value: tmp as u32,
30318            })?;
30319        let tmp = buf.get_u8();
30320        __struct.mode =
30321            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30322                enum_type: "UavcanNodeMode",
30323                value: tmp as u32,
30324            })?;
30325        __struct.sub_mode = buf.get_u8();
30326        Ok(__struct)
30327    }
30328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30329        let mut __tmp = BytesMut::new(bytes);
30330        #[allow(clippy::absurd_extreme_comparisons)]
30331        #[allow(unused_comparisons)]
30332        if __tmp.remaining() < Self::ENCODED_LEN {
30333            panic!(
30334                "buffer is too small (need {} bytes, but got {})",
30335                Self::ENCODED_LEN,
30336                __tmp.remaining(),
30337            )
30338        }
30339        __tmp.put_u64_le(self.time_usec);
30340        __tmp.put_u32_le(self.uptime_sec);
30341        __tmp.put_u16_le(self.vendor_specific_status_code);
30342        __tmp.put_u8(self.health as u8);
30343        __tmp.put_u8(self.mode as u8);
30344        __tmp.put_u8(self.sub_mode);
30345        if matches!(version, MavlinkVersion::V2) {
30346            let len = __tmp.len();
30347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30348        } else {
30349            __tmp.len()
30350        }
30351    }
30352}
30353#[doc = "id: 340"]
30354#[doc = "The global position resulting from GPS and sensor fusion."]
30355#[derive(Debug, Clone, PartialEq)]
30356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30358pub struct UTM_GLOBAL_POSITION_DATA {
30359    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30360    pub time: u64,
30361    #[doc = "Latitude (WGS84)"]
30362    pub lat: i32,
30363    #[doc = "Longitude (WGS84)"]
30364    pub lon: i32,
30365    #[doc = "Altitude (WGS84)"]
30366    pub alt: i32,
30367    #[doc = "Altitude above ground"]
30368    pub relative_alt: i32,
30369    #[doc = "Next waypoint, latitude (WGS84)"]
30370    pub next_lat: i32,
30371    #[doc = "Next waypoint, longitude (WGS84)"]
30372    pub next_lon: i32,
30373    #[doc = "Next waypoint, altitude (WGS84)"]
30374    pub next_alt: i32,
30375    #[doc = "Ground X speed (latitude, positive north)"]
30376    pub vx: i16,
30377    #[doc = "Ground Y speed (longitude, positive east)"]
30378    pub vy: i16,
30379    #[doc = "Ground Z speed (altitude, positive down)"]
30380    pub vz: i16,
30381    #[doc = "Horizontal position uncertainty (standard deviation)"]
30382    pub h_acc: u16,
30383    #[doc = "Altitude uncertainty (standard deviation)"]
30384    pub v_acc: u16,
30385    #[doc = "Speed uncertainty (standard deviation)"]
30386    pub vel_acc: u16,
30387    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
30388    pub update_rate: u16,
30389    #[doc = "Unique UAS ID."]
30390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30391    pub uas_id: [u8; 18],
30392    #[doc = "Flight state"]
30393    pub flight_state: UtmFlightState,
30394    #[doc = "Bitwise OR combination of the data available flags."]
30395    pub flags: UtmDataAvailFlags,
30396}
30397impl UTM_GLOBAL_POSITION_DATA {
30398    pub const ENCODED_LEN: usize = 70usize;
30399    pub const DEFAULT: Self = Self {
30400        time: 0_u64,
30401        lat: 0_i32,
30402        lon: 0_i32,
30403        alt: 0_i32,
30404        relative_alt: 0_i32,
30405        next_lat: 0_i32,
30406        next_lon: 0_i32,
30407        next_alt: 0_i32,
30408        vx: 0_i16,
30409        vy: 0_i16,
30410        vz: 0_i16,
30411        h_acc: 0_u16,
30412        v_acc: 0_u16,
30413        vel_acc: 0_u16,
30414        update_rate: 0_u16,
30415        uas_id: [0_u8; 18usize],
30416        flight_state: UtmFlightState::DEFAULT,
30417        flags: UtmDataAvailFlags::DEFAULT,
30418    };
30419    #[cfg(feature = "arbitrary")]
30420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30421        use arbitrary::{Arbitrary, Unstructured};
30422        let mut buf = [0u8; 1024];
30423        rng.fill_bytes(&mut buf);
30424        let mut unstructured = Unstructured::new(&buf);
30425        Self::arbitrary(&mut unstructured).unwrap_or_default()
30426    }
30427}
30428impl Default for UTM_GLOBAL_POSITION_DATA {
30429    fn default() -> Self {
30430        Self::DEFAULT.clone()
30431    }
30432}
30433impl MessageData for UTM_GLOBAL_POSITION_DATA {
30434    type Message = MavMessage;
30435    const ID: u32 = 340u32;
30436    const NAME: &'static str = "UTM_GLOBAL_POSITION";
30437    const EXTRA_CRC: u8 = 99u8;
30438    const ENCODED_LEN: usize = 70usize;
30439    fn deser(
30440        _version: MavlinkVersion,
30441        __input: &[u8],
30442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30443        let avail_len = __input.len();
30444        let mut payload_buf = [0; Self::ENCODED_LEN];
30445        let mut buf = if avail_len < Self::ENCODED_LEN {
30446            payload_buf[0..avail_len].copy_from_slice(__input);
30447            Bytes::new(&payload_buf)
30448        } else {
30449            Bytes::new(__input)
30450        };
30451        let mut __struct = Self::default();
30452        __struct.time = buf.get_u64_le();
30453        __struct.lat = buf.get_i32_le();
30454        __struct.lon = buf.get_i32_le();
30455        __struct.alt = buf.get_i32_le();
30456        __struct.relative_alt = buf.get_i32_le();
30457        __struct.next_lat = buf.get_i32_le();
30458        __struct.next_lon = buf.get_i32_le();
30459        __struct.next_alt = buf.get_i32_le();
30460        __struct.vx = buf.get_i16_le();
30461        __struct.vy = buf.get_i16_le();
30462        __struct.vz = buf.get_i16_le();
30463        __struct.h_acc = buf.get_u16_le();
30464        __struct.v_acc = buf.get_u16_le();
30465        __struct.vel_acc = buf.get_u16_le();
30466        __struct.update_rate = buf.get_u16_le();
30467        for v in &mut __struct.uas_id {
30468            let val = buf.get_u8();
30469            *v = val;
30470        }
30471        let tmp = buf.get_u8();
30472        __struct.flight_state =
30473            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30474                enum_type: "UtmFlightState",
30475                value: tmp as u32,
30476            })?;
30477        let tmp = buf.get_u8();
30478        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
30479            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30480                flag_type: "UtmDataAvailFlags",
30481                value: tmp as u32,
30482            })?;
30483        Ok(__struct)
30484    }
30485    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30486        let mut __tmp = BytesMut::new(bytes);
30487        #[allow(clippy::absurd_extreme_comparisons)]
30488        #[allow(unused_comparisons)]
30489        if __tmp.remaining() < Self::ENCODED_LEN {
30490            panic!(
30491                "buffer is too small (need {} bytes, but got {})",
30492                Self::ENCODED_LEN,
30493                __tmp.remaining(),
30494            )
30495        }
30496        __tmp.put_u64_le(self.time);
30497        __tmp.put_i32_le(self.lat);
30498        __tmp.put_i32_le(self.lon);
30499        __tmp.put_i32_le(self.alt);
30500        __tmp.put_i32_le(self.relative_alt);
30501        __tmp.put_i32_le(self.next_lat);
30502        __tmp.put_i32_le(self.next_lon);
30503        __tmp.put_i32_le(self.next_alt);
30504        __tmp.put_i16_le(self.vx);
30505        __tmp.put_i16_le(self.vy);
30506        __tmp.put_i16_le(self.vz);
30507        __tmp.put_u16_le(self.h_acc);
30508        __tmp.put_u16_le(self.v_acc);
30509        __tmp.put_u16_le(self.vel_acc);
30510        __tmp.put_u16_le(self.update_rate);
30511        for val in &self.uas_id {
30512            __tmp.put_u8(*val);
30513        }
30514        __tmp.put_u8(self.flight_state as u8);
30515        __tmp.put_u8(self.flags.bits());
30516        if matches!(version, MavlinkVersion::V2) {
30517            let len = __tmp.len();
30518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30519        } else {
30520            __tmp.len()
30521        }
30522    }
30523}
30524#[doc = "id: 248"]
30525#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30526#[derive(Debug, Clone, PartialEq)]
30527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30529pub struct V2_EXTENSION_DATA {
30530    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30531    pub message_type: u16,
30532    #[doc = "Network ID (0 for broadcast)"]
30533    pub target_network: u8,
30534    #[doc = "System ID (0 for broadcast)"]
30535    pub target_system: u8,
30536    #[doc = "Component ID (0 for broadcast)"]
30537    pub target_component: u8,
30538    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30539    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30540    pub payload: [u8; 249],
30541}
30542impl V2_EXTENSION_DATA {
30543    pub const ENCODED_LEN: usize = 254usize;
30544    pub const DEFAULT: Self = Self {
30545        message_type: 0_u16,
30546        target_network: 0_u8,
30547        target_system: 0_u8,
30548        target_component: 0_u8,
30549        payload: [0_u8; 249usize],
30550    };
30551    #[cfg(feature = "arbitrary")]
30552    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30553        use arbitrary::{Arbitrary, Unstructured};
30554        let mut buf = [0u8; 1024];
30555        rng.fill_bytes(&mut buf);
30556        let mut unstructured = Unstructured::new(&buf);
30557        Self::arbitrary(&mut unstructured).unwrap_or_default()
30558    }
30559}
30560impl Default for V2_EXTENSION_DATA {
30561    fn default() -> Self {
30562        Self::DEFAULT.clone()
30563    }
30564}
30565impl MessageData for V2_EXTENSION_DATA {
30566    type Message = MavMessage;
30567    const ID: u32 = 248u32;
30568    const NAME: &'static str = "V2_EXTENSION";
30569    const EXTRA_CRC: u8 = 8u8;
30570    const ENCODED_LEN: usize = 254usize;
30571    fn deser(
30572        _version: MavlinkVersion,
30573        __input: &[u8],
30574    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30575        let avail_len = __input.len();
30576        let mut payload_buf = [0; Self::ENCODED_LEN];
30577        let mut buf = if avail_len < Self::ENCODED_LEN {
30578            payload_buf[0..avail_len].copy_from_slice(__input);
30579            Bytes::new(&payload_buf)
30580        } else {
30581            Bytes::new(__input)
30582        };
30583        let mut __struct = Self::default();
30584        __struct.message_type = buf.get_u16_le();
30585        __struct.target_network = buf.get_u8();
30586        __struct.target_system = buf.get_u8();
30587        __struct.target_component = buf.get_u8();
30588        for v in &mut __struct.payload {
30589            let val = buf.get_u8();
30590            *v = val;
30591        }
30592        Ok(__struct)
30593    }
30594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30595        let mut __tmp = BytesMut::new(bytes);
30596        #[allow(clippy::absurd_extreme_comparisons)]
30597        #[allow(unused_comparisons)]
30598        if __tmp.remaining() < Self::ENCODED_LEN {
30599            panic!(
30600                "buffer is too small (need {} bytes, but got {})",
30601                Self::ENCODED_LEN,
30602                __tmp.remaining(),
30603            )
30604        }
30605        __tmp.put_u16_le(self.message_type);
30606        __tmp.put_u8(self.target_network);
30607        __tmp.put_u8(self.target_system);
30608        __tmp.put_u8(self.target_component);
30609        for val in &self.payload {
30610            __tmp.put_u8(*val);
30611        }
30612        if matches!(version, MavlinkVersion::V2) {
30613            let len = __tmp.len();
30614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30615        } else {
30616            __tmp.len()
30617        }
30618    }
30619}
30620#[doc = "id: 74"]
30621#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30622#[derive(Debug, Clone, PartialEq)]
30623#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30625pub struct VFR_HUD_DATA {
30626    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30627    pub airspeed: f32,
30628    #[doc = "Current ground speed."]
30629    pub groundspeed: f32,
30630    #[doc = "Current altitude (MSL)."]
30631    pub alt: f32,
30632    #[doc = "Current climb rate."]
30633    pub climb: f32,
30634    #[doc = "Current heading in compass units (0-360, 0=north)."]
30635    pub heading: i16,
30636    #[doc = "Current throttle setting (0 to 100)."]
30637    pub throttle: u16,
30638}
30639impl VFR_HUD_DATA {
30640    pub const ENCODED_LEN: usize = 20usize;
30641    pub const DEFAULT: Self = Self {
30642        airspeed: 0.0_f32,
30643        groundspeed: 0.0_f32,
30644        alt: 0.0_f32,
30645        climb: 0.0_f32,
30646        heading: 0_i16,
30647        throttle: 0_u16,
30648    };
30649    #[cfg(feature = "arbitrary")]
30650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30651        use arbitrary::{Arbitrary, Unstructured};
30652        let mut buf = [0u8; 1024];
30653        rng.fill_bytes(&mut buf);
30654        let mut unstructured = Unstructured::new(&buf);
30655        Self::arbitrary(&mut unstructured).unwrap_or_default()
30656    }
30657}
30658impl Default for VFR_HUD_DATA {
30659    fn default() -> Self {
30660        Self::DEFAULT.clone()
30661    }
30662}
30663impl MessageData for VFR_HUD_DATA {
30664    type Message = MavMessage;
30665    const ID: u32 = 74u32;
30666    const NAME: &'static str = "VFR_HUD";
30667    const EXTRA_CRC: u8 = 20u8;
30668    const ENCODED_LEN: usize = 20usize;
30669    fn deser(
30670        _version: MavlinkVersion,
30671        __input: &[u8],
30672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30673        let avail_len = __input.len();
30674        let mut payload_buf = [0; Self::ENCODED_LEN];
30675        let mut buf = if avail_len < Self::ENCODED_LEN {
30676            payload_buf[0..avail_len].copy_from_slice(__input);
30677            Bytes::new(&payload_buf)
30678        } else {
30679            Bytes::new(__input)
30680        };
30681        let mut __struct = Self::default();
30682        __struct.airspeed = buf.get_f32_le();
30683        __struct.groundspeed = buf.get_f32_le();
30684        __struct.alt = buf.get_f32_le();
30685        __struct.climb = buf.get_f32_le();
30686        __struct.heading = buf.get_i16_le();
30687        __struct.throttle = buf.get_u16_le();
30688        Ok(__struct)
30689    }
30690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30691        let mut __tmp = BytesMut::new(bytes);
30692        #[allow(clippy::absurd_extreme_comparisons)]
30693        #[allow(unused_comparisons)]
30694        if __tmp.remaining() < Self::ENCODED_LEN {
30695            panic!(
30696                "buffer is too small (need {} bytes, but got {})",
30697                Self::ENCODED_LEN,
30698                __tmp.remaining(),
30699            )
30700        }
30701        __tmp.put_f32_le(self.airspeed);
30702        __tmp.put_f32_le(self.groundspeed);
30703        __tmp.put_f32_le(self.alt);
30704        __tmp.put_f32_le(self.climb);
30705        __tmp.put_i16_le(self.heading);
30706        __tmp.put_u16_le(self.throttle);
30707        if matches!(version, MavlinkVersion::V2) {
30708            let len = __tmp.len();
30709            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30710        } else {
30711            __tmp.len()
30712        }
30713    }
30714}
30715#[doc = "id: 241"]
30716#[doc = "Vibration levels and accelerometer clipping."]
30717#[derive(Debug, Clone, PartialEq)]
30718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30720pub struct VIBRATION_DATA {
30721    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30722    pub time_usec: u64,
30723    #[doc = "Vibration levels on X-axis"]
30724    pub vibration_x: f32,
30725    #[doc = "Vibration levels on Y-axis"]
30726    pub vibration_y: f32,
30727    #[doc = "Vibration levels on Z-axis"]
30728    pub vibration_z: f32,
30729    #[doc = "first accelerometer clipping count"]
30730    pub clipping_0: u32,
30731    #[doc = "second accelerometer clipping count"]
30732    pub clipping_1: u32,
30733    #[doc = "third accelerometer clipping count"]
30734    pub clipping_2: u32,
30735}
30736impl VIBRATION_DATA {
30737    pub const ENCODED_LEN: usize = 32usize;
30738    pub const DEFAULT: Self = Self {
30739        time_usec: 0_u64,
30740        vibration_x: 0.0_f32,
30741        vibration_y: 0.0_f32,
30742        vibration_z: 0.0_f32,
30743        clipping_0: 0_u32,
30744        clipping_1: 0_u32,
30745        clipping_2: 0_u32,
30746    };
30747    #[cfg(feature = "arbitrary")]
30748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30749        use arbitrary::{Arbitrary, Unstructured};
30750        let mut buf = [0u8; 1024];
30751        rng.fill_bytes(&mut buf);
30752        let mut unstructured = Unstructured::new(&buf);
30753        Self::arbitrary(&mut unstructured).unwrap_or_default()
30754    }
30755}
30756impl Default for VIBRATION_DATA {
30757    fn default() -> Self {
30758        Self::DEFAULT.clone()
30759    }
30760}
30761impl MessageData for VIBRATION_DATA {
30762    type Message = MavMessage;
30763    const ID: u32 = 241u32;
30764    const NAME: &'static str = "VIBRATION";
30765    const EXTRA_CRC: u8 = 90u8;
30766    const ENCODED_LEN: usize = 32usize;
30767    fn deser(
30768        _version: MavlinkVersion,
30769        __input: &[u8],
30770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30771        let avail_len = __input.len();
30772        let mut payload_buf = [0; Self::ENCODED_LEN];
30773        let mut buf = if avail_len < Self::ENCODED_LEN {
30774            payload_buf[0..avail_len].copy_from_slice(__input);
30775            Bytes::new(&payload_buf)
30776        } else {
30777            Bytes::new(__input)
30778        };
30779        let mut __struct = Self::default();
30780        __struct.time_usec = buf.get_u64_le();
30781        __struct.vibration_x = buf.get_f32_le();
30782        __struct.vibration_y = buf.get_f32_le();
30783        __struct.vibration_z = buf.get_f32_le();
30784        __struct.clipping_0 = buf.get_u32_le();
30785        __struct.clipping_1 = buf.get_u32_le();
30786        __struct.clipping_2 = buf.get_u32_le();
30787        Ok(__struct)
30788    }
30789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30790        let mut __tmp = BytesMut::new(bytes);
30791        #[allow(clippy::absurd_extreme_comparisons)]
30792        #[allow(unused_comparisons)]
30793        if __tmp.remaining() < Self::ENCODED_LEN {
30794            panic!(
30795                "buffer is too small (need {} bytes, but got {})",
30796                Self::ENCODED_LEN,
30797                __tmp.remaining(),
30798            )
30799        }
30800        __tmp.put_u64_le(self.time_usec);
30801        __tmp.put_f32_le(self.vibration_x);
30802        __tmp.put_f32_le(self.vibration_y);
30803        __tmp.put_f32_le(self.vibration_z);
30804        __tmp.put_u32_le(self.clipping_0);
30805        __tmp.put_u32_le(self.clipping_1);
30806        __tmp.put_u32_le(self.clipping_2);
30807        if matches!(version, MavlinkVersion::V2) {
30808            let len = __tmp.len();
30809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30810        } else {
30811            __tmp.len()
30812        }
30813    }
30814}
30815#[doc = "id: 104"]
30816#[doc = "Global position estimate from a Vicon motion system source."]
30817#[derive(Debug, Clone, PartialEq)]
30818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30820pub struct VICON_POSITION_ESTIMATE_DATA {
30821    #[doc = "Timestamp (UNIX time or time since system boot)"]
30822    pub usec: u64,
30823    #[doc = "Global X position"]
30824    pub x: f32,
30825    #[doc = "Global Y position"]
30826    pub y: f32,
30827    #[doc = "Global Z position"]
30828    pub z: f32,
30829    #[doc = "Roll angle"]
30830    pub roll: f32,
30831    #[doc = "Pitch angle"]
30832    pub pitch: f32,
30833    #[doc = "Yaw angle"]
30834    pub yaw: f32,
30835    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30836    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30837    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30838    pub covariance: [f32; 21],
30839}
30840impl VICON_POSITION_ESTIMATE_DATA {
30841    pub const ENCODED_LEN: usize = 116usize;
30842    pub const DEFAULT: Self = Self {
30843        usec: 0_u64,
30844        x: 0.0_f32,
30845        y: 0.0_f32,
30846        z: 0.0_f32,
30847        roll: 0.0_f32,
30848        pitch: 0.0_f32,
30849        yaw: 0.0_f32,
30850        covariance: [0.0_f32; 21usize],
30851    };
30852    #[cfg(feature = "arbitrary")]
30853    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30854        use arbitrary::{Arbitrary, Unstructured};
30855        let mut buf = [0u8; 1024];
30856        rng.fill_bytes(&mut buf);
30857        let mut unstructured = Unstructured::new(&buf);
30858        Self::arbitrary(&mut unstructured).unwrap_or_default()
30859    }
30860}
30861impl Default for VICON_POSITION_ESTIMATE_DATA {
30862    fn default() -> Self {
30863        Self::DEFAULT.clone()
30864    }
30865}
30866impl MessageData for VICON_POSITION_ESTIMATE_DATA {
30867    type Message = MavMessage;
30868    const ID: u32 = 104u32;
30869    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
30870    const EXTRA_CRC: u8 = 56u8;
30871    const ENCODED_LEN: usize = 116usize;
30872    fn deser(
30873        _version: MavlinkVersion,
30874        __input: &[u8],
30875    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30876        let avail_len = __input.len();
30877        let mut payload_buf = [0; Self::ENCODED_LEN];
30878        let mut buf = if avail_len < Self::ENCODED_LEN {
30879            payload_buf[0..avail_len].copy_from_slice(__input);
30880            Bytes::new(&payload_buf)
30881        } else {
30882            Bytes::new(__input)
30883        };
30884        let mut __struct = Self::default();
30885        __struct.usec = buf.get_u64_le();
30886        __struct.x = buf.get_f32_le();
30887        __struct.y = buf.get_f32_le();
30888        __struct.z = buf.get_f32_le();
30889        __struct.roll = buf.get_f32_le();
30890        __struct.pitch = buf.get_f32_le();
30891        __struct.yaw = buf.get_f32_le();
30892        for v in &mut __struct.covariance {
30893            let val = buf.get_f32_le();
30894            *v = val;
30895        }
30896        Ok(__struct)
30897    }
30898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30899        let mut __tmp = BytesMut::new(bytes);
30900        #[allow(clippy::absurd_extreme_comparisons)]
30901        #[allow(unused_comparisons)]
30902        if __tmp.remaining() < Self::ENCODED_LEN {
30903            panic!(
30904                "buffer is too small (need {} bytes, but got {})",
30905                Self::ENCODED_LEN,
30906                __tmp.remaining(),
30907            )
30908        }
30909        __tmp.put_u64_le(self.usec);
30910        __tmp.put_f32_le(self.x);
30911        __tmp.put_f32_le(self.y);
30912        __tmp.put_f32_le(self.z);
30913        __tmp.put_f32_le(self.roll);
30914        __tmp.put_f32_le(self.pitch);
30915        __tmp.put_f32_le(self.yaw);
30916        for val in &self.covariance {
30917            __tmp.put_f32_le(*val);
30918        }
30919        if matches!(version, MavlinkVersion::V2) {
30920            let len = __tmp.len();
30921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30922        } else {
30923            __tmp.len()
30924        }
30925    }
30926}
30927#[doc = "id: 269"]
30928#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30929#[derive(Debug, Clone, PartialEq)]
30930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30932pub struct VIDEO_STREAM_INFORMATION_DATA {
30933    #[doc = "Frame rate."]
30934    pub framerate: f32,
30935    #[doc = "Bit rate."]
30936    pub bitrate: u32,
30937    #[doc = "Bitmap of stream status flags."]
30938    pub flags: VideoStreamStatusFlags,
30939    #[doc = "Horizontal resolution."]
30940    pub resolution_h: u16,
30941    #[doc = "Vertical resolution."]
30942    pub resolution_v: u16,
30943    #[doc = "Video image rotation clockwise."]
30944    pub rotation: u16,
30945    #[doc = "Horizontal Field of view."]
30946    pub hfov: u16,
30947    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30948    pub stream_id: u8,
30949    #[doc = "Number of streams available."]
30950    pub count: u8,
30951    #[doc = "Type of stream."]
30952    pub mavtype: VideoStreamType,
30953    #[doc = "Stream name."]
30954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30955    pub name: [u8; 32],
30956    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30958    pub uri: [u8; 160],
30959    #[doc = "Encoding of stream."]
30960    #[cfg_attr(feature = "serde", serde(default))]
30961    pub encoding: VideoStreamEncoding,
30962    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30964    pub camera_device_id: u8,
30965}
30966impl VIDEO_STREAM_INFORMATION_DATA {
30967    pub const ENCODED_LEN: usize = 215usize;
30968    pub const DEFAULT: Self = Self {
30969        framerate: 0.0_f32,
30970        bitrate: 0_u32,
30971        flags: VideoStreamStatusFlags::DEFAULT,
30972        resolution_h: 0_u16,
30973        resolution_v: 0_u16,
30974        rotation: 0_u16,
30975        hfov: 0_u16,
30976        stream_id: 0_u8,
30977        count: 0_u8,
30978        mavtype: VideoStreamType::DEFAULT,
30979        name: [0_u8; 32usize],
30980        uri: [0_u8; 160usize],
30981        encoding: VideoStreamEncoding::DEFAULT,
30982        camera_device_id: 0_u8,
30983    };
30984    #[cfg(feature = "arbitrary")]
30985    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30986        use arbitrary::{Arbitrary, Unstructured};
30987        let mut buf = [0u8; 1024];
30988        rng.fill_bytes(&mut buf);
30989        let mut unstructured = Unstructured::new(&buf);
30990        Self::arbitrary(&mut unstructured).unwrap_or_default()
30991    }
30992}
30993impl Default for VIDEO_STREAM_INFORMATION_DATA {
30994    fn default() -> Self {
30995        Self::DEFAULT.clone()
30996    }
30997}
30998impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30999    type Message = MavMessage;
31000    const ID: u32 = 269u32;
31001    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31002    const EXTRA_CRC: u8 = 109u8;
31003    const ENCODED_LEN: usize = 215usize;
31004    fn deser(
31005        _version: MavlinkVersion,
31006        __input: &[u8],
31007    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31008        let avail_len = __input.len();
31009        let mut payload_buf = [0; Self::ENCODED_LEN];
31010        let mut buf = if avail_len < Self::ENCODED_LEN {
31011            payload_buf[0..avail_len].copy_from_slice(__input);
31012            Bytes::new(&payload_buf)
31013        } else {
31014            Bytes::new(__input)
31015        };
31016        let mut __struct = Self::default();
31017        __struct.framerate = buf.get_f32_le();
31018        __struct.bitrate = buf.get_u32_le();
31019        let tmp = buf.get_u16_le();
31020        __struct.flags = VideoStreamStatusFlags::from_bits(
31021            tmp & VideoStreamStatusFlags::all().bits(),
31022        )
31023        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31024            flag_type: "VideoStreamStatusFlags",
31025            value: tmp as u32,
31026        })?;
31027        __struct.resolution_h = buf.get_u16_le();
31028        __struct.resolution_v = buf.get_u16_le();
31029        __struct.rotation = buf.get_u16_le();
31030        __struct.hfov = buf.get_u16_le();
31031        __struct.stream_id = buf.get_u8();
31032        __struct.count = buf.get_u8();
31033        let tmp = buf.get_u8();
31034        __struct.mavtype =
31035            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31036                enum_type: "VideoStreamType",
31037                value: tmp as u32,
31038            })?;
31039        for v in &mut __struct.name {
31040            let val = buf.get_u8();
31041            *v = val;
31042        }
31043        for v in &mut __struct.uri {
31044            let val = buf.get_u8();
31045            *v = val;
31046        }
31047        let tmp = buf.get_u8();
31048        __struct.encoding =
31049            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31050                enum_type: "VideoStreamEncoding",
31051                value: tmp as u32,
31052            })?;
31053        __struct.camera_device_id = buf.get_u8();
31054        Ok(__struct)
31055    }
31056    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31057        let mut __tmp = BytesMut::new(bytes);
31058        #[allow(clippy::absurd_extreme_comparisons)]
31059        #[allow(unused_comparisons)]
31060        if __tmp.remaining() < Self::ENCODED_LEN {
31061            panic!(
31062                "buffer is too small (need {} bytes, but got {})",
31063                Self::ENCODED_LEN,
31064                __tmp.remaining(),
31065            )
31066        }
31067        __tmp.put_f32_le(self.framerate);
31068        __tmp.put_u32_le(self.bitrate);
31069        __tmp.put_u16_le(self.flags.bits());
31070        __tmp.put_u16_le(self.resolution_h);
31071        __tmp.put_u16_le(self.resolution_v);
31072        __tmp.put_u16_le(self.rotation);
31073        __tmp.put_u16_le(self.hfov);
31074        __tmp.put_u8(self.stream_id);
31075        __tmp.put_u8(self.count);
31076        __tmp.put_u8(self.mavtype as u8);
31077        for val in &self.name {
31078            __tmp.put_u8(*val);
31079        }
31080        for val in &self.uri {
31081            __tmp.put_u8(*val);
31082        }
31083        __tmp.put_u8(self.encoding as u8);
31084        __tmp.put_u8(self.camera_device_id);
31085        if matches!(version, MavlinkVersion::V2) {
31086            let len = __tmp.len();
31087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31088        } else {
31089            __tmp.len()
31090        }
31091    }
31092}
31093#[doc = "id: 270"]
31094#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31095#[derive(Debug, Clone, PartialEq)]
31096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31098pub struct VIDEO_STREAM_STATUS_DATA {
31099    #[doc = "Frame rate"]
31100    pub framerate: f32,
31101    #[doc = "Bit rate"]
31102    pub bitrate: u32,
31103    #[doc = "Bitmap of stream status flags"]
31104    pub flags: VideoStreamStatusFlags,
31105    #[doc = "Horizontal resolution"]
31106    pub resolution_h: u16,
31107    #[doc = "Vertical resolution"]
31108    pub resolution_v: u16,
31109    #[doc = "Video image rotation clockwise"]
31110    pub rotation: u16,
31111    #[doc = "Horizontal Field of view"]
31112    pub hfov: u16,
31113    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31114    pub stream_id: u8,
31115    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31117    pub camera_device_id: u8,
31118}
31119impl VIDEO_STREAM_STATUS_DATA {
31120    pub const ENCODED_LEN: usize = 20usize;
31121    pub const DEFAULT: Self = Self {
31122        framerate: 0.0_f32,
31123        bitrate: 0_u32,
31124        flags: VideoStreamStatusFlags::DEFAULT,
31125        resolution_h: 0_u16,
31126        resolution_v: 0_u16,
31127        rotation: 0_u16,
31128        hfov: 0_u16,
31129        stream_id: 0_u8,
31130        camera_device_id: 0_u8,
31131    };
31132    #[cfg(feature = "arbitrary")]
31133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31134        use arbitrary::{Arbitrary, Unstructured};
31135        let mut buf = [0u8; 1024];
31136        rng.fill_bytes(&mut buf);
31137        let mut unstructured = Unstructured::new(&buf);
31138        Self::arbitrary(&mut unstructured).unwrap_or_default()
31139    }
31140}
31141impl Default for VIDEO_STREAM_STATUS_DATA {
31142    fn default() -> Self {
31143        Self::DEFAULT.clone()
31144    }
31145}
31146impl MessageData for VIDEO_STREAM_STATUS_DATA {
31147    type Message = MavMessage;
31148    const ID: u32 = 270u32;
31149    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31150    const EXTRA_CRC: u8 = 59u8;
31151    const ENCODED_LEN: usize = 20usize;
31152    fn deser(
31153        _version: MavlinkVersion,
31154        __input: &[u8],
31155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31156        let avail_len = __input.len();
31157        let mut payload_buf = [0; Self::ENCODED_LEN];
31158        let mut buf = if avail_len < Self::ENCODED_LEN {
31159            payload_buf[0..avail_len].copy_from_slice(__input);
31160            Bytes::new(&payload_buf)
31161        } else {
31162            Bytes::new(__input)
31163        };
31164        let mut __struct = Self::default();
31165        __struct.framerate = buf.get_f32_le();
31166        __struct.bitrate = buf.get_u32_le();
31167        let tmp = buf.get_u16_le();
31168        __struct.flags = VideoStreamStatusFlags::from_bits(
31169            tmp & VideoStreamStatusFlags::all().bits(),
31170        )
31171        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31172            flag_type: "VideoStreamStatusFlags",
31173            value: tmp as u32,
31174        })?;
31175        __struct.resolution_h = buf.get_u16_le();
31176        __struct.resolution_v = buf.get_u16_le();
31177        __struct.rotation = buf.get_u16_le();
31178        __struct.hfov = buf.get_u16_le();
31179        __struct.stream_id = buf.get_u8();
31180        __struct.camera_device_id = buf.get_u8();
31181        Ok(__struct)
31182    }
31183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31184        let mut __tmp = BytesMut::new(bytes);
31185        #[allow(clippy::absurd_extreme_comparisons)]
31186        #[allow(unused_comparisons)]
31187        if __tmp.remaining() < Self::ENCODED_LEN {
31188            panic!(
31189                "buffer is too small (need {} bytes, but got {})",
31190                Self::ENCODED_LEN,
31191                __tmp.remaining(),
31192            )
31193        }
31194        __tmp.put_f32_le(self.framerate);
31195        __tmp.put_u32_le(self.bitrate);
31196        __tmp.put_u16_le(self.flags.bits());
31197        __tmp.put_u16_le(self.resolution_h);
31198        __tmp.put_u16_le(self.resolution_v);
31199        __tmp.put_u16_le(self.rotation);
31200        __tmp.put_u16_le(self.hfov);
31201        __tmp.put_u8(self.stream_id);
31202        __tmp.put_u8(self.camera_device_id);
31203        if matches!(version, MavlinkVersion::V2) {
31204            let len = __tmp.len();
31205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31206        } else {
31207            __tmp.len()
31208        }
31209    }
31210}
31211#[doc = "id: 102"]
31212#[doc = "Local position/attitude estimate from a vision source."]
31213#[derive(Debug, Clone, PartialEq)]
31214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31216pub struct VISION_POSITION_ESTIMATE_DATA {
31217    #[doc = "Timestamp (UNIX time or time since system boot)"]
31218    pub usec: u64,
31219    #[doc = "Local X position"]
31220    pub x: f32,
31221    #[doc = "Local Y position"]
31222    pub y: f32,
31223    #[doc = "Local Z position"]
31224    pub z: f32,
31225    #[doc = "Roll angle"]
31226    pub roll: f32,
31227    #[doc = "Pitch angle"]
31228    pub pitch: f32,
31229    #[doc = "Yaw angle"]
31230    pub yaw: f32,
31231    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31234    pub covariance: [f32; 21],
31235    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31237    pub reset_counter: u8,
31238}
31239impl VISION_POSITION_ESTIMATE_DATA {
31240    pub const ENCODED_LEN: usize = 117usize;
31241    pub const DEFAULT: Self = Self {
31242        usec: 0_u64,
31243        x: 0.0_f32,
31244        y: 0.0_f32,
31245        z: 0.0_f32,
31246        roll: 0.0_f32,
31247        pitch: 0.0_f32,
31248        yaw: 0.0_f32,
31249        covariance: [0.0_f32; 21usize],
31250        reset_counter: 0_u8,
31251    };
31252    #[cfg(feature = "arbitrary")]
31253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31254        use arbitrary::{Arbitrary, Unstructured};
31255        let mut buf = [0u8; 1024];
31256        rng.fill_bytes(&mut buf);
31257        let mut unstructured = Unstructured::new(&buf);
31258        Self::arbitrary(&mut unstructured).unwrap_or_default()
31259    }
31260}
31261impl Default for VISION_POSITION_ESTIMATE_DATA {
31262    fn default() -> Self {
31263        Self::DEFAULT.clone()
31264    }
31265}
31266impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31267    type Message = MavMessage;
31268    const ID: u32 = 102u32;
31269    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31270    const EXTRA_CRC: u8 = 158u8;
31271    const ENCODED_LEN: usize = 117usize;
31272    fn deser(
31273        _version: MavlinkVersion,
31274        __input: &[u8],
31275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31276        let avail_len = __input.len();
31277        let mut payload_buf = [0; Self::ENCODED_LEN];
31278        let mut buf = if avail_len < Self::ENCODED_LEN {
31279            payload_buf[0..avail_len].copy_from_slice(__input);
31280            Bytes::new(&payload_buf)
31281        } else {
31282            Bytes::new(__input)
31283        };
31284        let mut __struct = Self::default();
31285        __struct.usec = buf.get_u64_le();
31286        __struct.x = buf.get_f32_le();
31287        __struct.y = buf.get_f32_le();
31288        __struct.z = buf.get_f32_le();
31289        __struct.roll = buf.get_f32_le();
31290        __struct.pitch = buf.get_f32_le();
31291        __struct.yaw = buf.get_f32_le();
31292        for v in &mut __struct.covariance {
31293            let val = buf.get_f32_le();
31294            *v = val;
31295        }
31296        __struct.reset_counter = buf.get_u8();
31297        Ok(__struct)
31298    }
31299    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31300        let mut __tmp = BytesMut::new(bytes);
31301        #[allow(clippy::absurd_extreme_comparisons)]
31302        #[allow(unused_comparisons)]
31303        if __tmp.remaining() < Self::ENCODED_LEN {
31304            panic!(
31305                "buffer is too small (need {} bytes, but got {})",
31306                Self::ENCODED_LEN,
31307                __tmp.remaining(),
31308            )
31309        }
31310        __tmp.put_u64_le(self.usec);
31311        __tmp.put_f32_le(self.x);
31312        __tmp.put_f32_le(self.y);
31313        __tmp.put_f32_le(self.z);
31314        __tmp.put_f32_le(self.roll);
31315        __tmp.put_f32_le(self.pitch);
31316        __tmp.put_f32_le(self.yaw);
31317        for val in &self.covariance {
31318            __tmp.put_f32_le(*val);
31319        }
31320        __tmp.put_u8(self.reset_counter);
31321        if matches!(version, MavlinkVersion::V2) {
31322            let len = __tmp.len();
31323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31324        } else {
31325            __tmp.len()
31326        }
31327    }
31328}
31329#[doc = "id: 103"]
31330#[doc = "Speed estimate from a vision source."]
31331#[derive(Debug, Clone, PartialEq)]
31332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31333#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31334pub struct VISION_SPEED_ESTIMATE_DATA {
31335    #[doc = "Timestamp (UNIX time or time since system boot)"]
31336    pub usec: u64,
31337    #[doc = "Global X speed"]
31338    pub x: f32,
31339    #[doc = "Global Y speed"]
31340    pub y: f32,
31341    #[doc = "Global Z speed"]
31342    pub z: f32,
31343    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
31344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31346    pub covariance: [f32; 9],
31347    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31348    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31349    pub reset_counter: u8,
31350}
31351impl VISION_SPEED_ESTIMATE_DATA {
31352    pub const ENCODED_LEN: usize = 57usize;
31353    pub const DEFAULT: Self = Self {
31354        usec: 0_u64,
31355        x: 0.0_f32,
31356        y: 0.0_f32,
31357        z: 0.0_f32,
31358        covariance: [0.0_f32; 9usize],
31359        reset_counter: 0_u8,
31360    };
31361    #[cfg(feature = "arbitrary")]
31362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31363        use arbitrary::{Arbitrary, Unstructured};
31364        let mut buf = [0u8; 1024];
31365        rng.fill_bytes(&mut buf);
31366        let mut unstructured = Unstructured::new(&buf);
31367        Self::arbitrary(&mut unstructured).unwrap_or_default()
31368    }
31369}
31370impl Default for VISION_SPEED_ESTIMATE_DATA {
31371    fn default() -> Self {
31372        Self::DEFAULT.clone()
31373    }
31374}
31375impl MessageData for VISION_SPEED_ESTIMATE_DATA {
31376    type Message = MavMessage;
31377    const ID: u32 = 103u32;
31378    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
31379    const EXTRA_CRC: u8 = 208u8;
31380    const ENCODED_LEN: usize = 57usize;
31381    fn deser(
31382        _version: MavlinkVersion,
31383        __input: &[u8],
31384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31385        let avail_len = __input.len();
31386        let mut payload_buf = [0; Self::ENCODED_LEN];
31387        let mut buf = if avail_len < Self::ENCODED_LEN {
31388            payload_buf[0..avail_len].copy_from_slice(__input);
31389            Bytes::new(&payload_buf)
31390        } else {
31391            Bytes::new(__input)
31392        };
31393        let mut __struct = Self::default();
31394        __struct.usec = buf.get_u64_le();
31395        __struct.x = buf.get_f32_le();
31396        __struct.y = buf.get_f32_le();
31397        __struct.z = buf.get_f32_le();
31398        for v in &mut __struct.covariance {
31399            let val = buf.get_f32_le();
31400            *v = val;
31401        }
31402        __struct.reset_counter = buf.get_u8();
31403        Ok(__struct)
31404    }
31405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31406        let mut __tmp = BytesMut::new(bytes);
31407        #[allow(clippy::absurd_extreme_comparisons)]
31408        #[allow(unused_comparisons)]
31409        if __tmp.remaining() < Self::ENCODED_LEN {
31410            panic!(
31411                "buffer is too small (need {} bytes, but got {})",
31412                Self::ENCODED_LEN,
31413                __tmp.remaining(),
31414            )
31415        }
31416        __tmp.put_u64_le(self.usec);
31417        __tmp.put_f32_le(self.x);
31418        __tmp.put_f32_le(self.y);
31419        __tmp.put_f32_le(self.z);
31420        for val in &self.covariance {
31421            __tmp.put_f32_le(*val);
31422        }
31423        __tmp.put_u8(self.reset_counter);
31424        if matches!(version, MavlinkVersion::V2) {
31425            let len = __tmp.len();
31426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31427        } else {
31428            __tmp.len()
31429        }
31430    }
31431}
31432#[doc = "id: 9000"]
31433#[doc = "Cumulative distance traveled for each reported wheel."]
31434#[derive(Debug, Clone, PartialEq)]
31435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31437pub struct WHEEL_DISTANCE_DATA {
31438    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31439    pub time_usec: u64,
31440    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
31441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31442    pub distance: [f64; 16],
31443    #[doc = "Number of wheels reported."]
31444    pub count: u8,
31445}
31446impl WHEEL_DISTANCE_DATA {
31447    pub const ENCODED_LEN: usize = 137usize;
31448    pub const DEFAULT: Self = Self {
31449        time_usec: 0_u64,
31450        distance: [0.0_f64; 16usize],
31451        count: 0_u8,
31452    };
31453    #[cfg(feature = "arbitrary")]
31454    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31455        use arbitrary::{Arbitrary, Unstructured};
31456        let mut buf = [0u8; 1024];
31457        rng.fill_bytes(&mut buf);
31458        let mut unstructured = Unstructured::new(&buf);
31459        Self::arbitrary(&mut unstructured).unwrap_or_default()
31460    }
31461}
31462impl Default for WHEEL_DISTANCE_DATA {
31463    fn default() -> Self {
31464        Self::DEFAULT.clone()
31465    }
31466}
31467impl MessageData for WHEEL_DISTANCE_DATA {
31468    type Message = MavMessage;
31469    const ID: u32 = 9000u32;
31470    const NAME: &'static str = "WHEEL_DISTANCE";
31471    const EXTRA_CRC: u8 = 113u8;
31472    const ENCODED_LEN: usize = 137usize;
31473    fn deser(
31474        _version: MavlinkVersion,
31475        __input: &[u8],
31476    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31477        let avail_len = __input.len();
31478        let mut payload_buf = [0; Self::ENCODED_LEN];
31479        let mut buf = if avail_len < Self::ENCODED_LEN {
31480            payload_buf[0..avail_len].copy_from_slice(__input);
31481            Bytes::new(&payload_buf)
31482        } else {
31483            Bytes::new(__input)
31484        };
31485        let mut __struct = Self::default();
31486        __struct.time_usec = buf.get_u64_le();
31487        for v in &mut __struct.distance {
31488            let val = buf.get_f64_le();
31489            *v = val;
31490        }
31491        __struct.count = buf.get_u8();
31492        Ok(__struct)
31493    }
31494    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31495        let mut __tmp = BytesMut::new(bytes);
31496        #[allow(clippy::absurd_extreme_comparisons)]
31497        #[allow(unused_comparisons)]
31498        if __tmp.remaining() < Self::ENCODED_LEN {
31499            panic!(
31500                "buffer is too small (need {} bytes, but got {})",
31501                Self::ENCODED_LEN,
31502                __tmp.remaining(),
31503            )
31504        }
31505        __tmp.put_u64_le(self.time_usec);
31506        for val in &self.distance {
31507            __tmp.put_f64_le(*val);
31508        }
31509        __tmp.put_u8(self.count);
31510        if matches!(version, MavlinkVersion::V2) {
31511            let len = __tmp.len();
31512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31513        } else {
31514            __tmp.len()
31515        }
31516    }
31517}
31518#[doc = "id: 299"]
31519#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31520#[derive(Debug, Clone, PartialEq)]
31521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31523pub struct WIFI_CONFIG_AP_DATA {
31524    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31525    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31526    pub ssid: [u8; 32],
31527    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31529    pub password: [u8; 64],
31530    #[doc = "WiFi Mode."]
31531    #[cfg_attr(feature = "serde", serde(default))]
31532    pub mode: WifiConfigApMode,
31533    #[doc = "Message acceptance response (sent back to GS)."]
31534    #[cfg_attr(feature = "serde", serde(default))]
31535    pub response: WifiConfigApResponse,
31536}
31537impl WIFI_CONFIG_AP_DATA {
31538    pub const ENCODED_LEN: usize = 98usize;
31539    pub const DEFAULT: Self = Self {
31540        ssid: [0_u8; 32usize],
31541        password: [0_u8; 64usize],
31542        mode: WifiConfigApMode::DEFAULT,
31543        response: WifiConfigApResponse::DEFAULT,
31544    };
31545    #[cfg(feature = "arbitrary")]
31546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31547        use arbitrary::{Arbitrary, Unstructured};
31548        let mut buf = [0u8; 1024];
31549        rng.fill_bytes(&mut buf);
31550        let mut unstructured = Unstructured::new(&buf);
31551        Self::arbitrary(&mut unstructured).unwrap_or_default()
31552    }
31553}
31554impl Default for WIFI_CONFIG_AP_DATA {
31555    fn default() -> Self {
31556        Self::DEFAULT.clone()
31557    }
31558}
31559impl MessageData for WIFI_CONFIG_AP_DATA {
31560    type Message = MavMessage;
31561    const ID: u32 = 299u32;
31562    const NAME: &'static str = "WIFI_CONFIG_AP";
31563    const EXTRA_CRC: u8 = 19u8;
31564    const ENCODED_LEN: usize = 98usize;
31565    fn deser(
31566        _version: MavlinkVersion,
31567        __input: &[u8],
31568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31569        let avail_len = __input.len();
31570        let mut payload_buf = [0; Self::ENCODED_LEN];
31571        let mut buf = if avail_len < Self::ENCODED_LEN {
31572            payload_buf[0..avail_len].copy_from_slice(__input);
31573            Bytes::new(&payload_buf)
31574        } else {
31575            Bytes::new(__input)
31576        };
31577        let mut __struct = Self::default();
31578        for v in &mut __struct.ssid {
31579            let val = buf.get_u8();
31580            *v = val;
31581        }
31582        for v in &mut __struct.password {
31583            let val = buf.get_u8();
31584            *v = val;
31585        }
31586        let tmp = buf.get_i8();
31587        __struct.mode =
31588            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31589                enum_type: "WifiConfigApMode",
31590                value: tmp as u32,
31591            })?;
31592        let tmp = buf.get_i8();
31593        __struct.response =
31594            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31595                enum_type: "WifiConfigApResponse",
31596                value: tmp as u32,
31597            })?;
31598        Ok(__struct)
31599    }
31600    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31601        let mut __tmp = BytesMut::new(bytes);
31602        #[allow(clippy::absurd_extreme_comparisons)]
31603        #[allow(unused_comparisons)]
31604        if __tmp.remaining() < Self::ENCODED_LEN {
31605            panic!(
31606                "buffer is too small (need {} bytes, but got {})",
31607                Self::ENCODED_LEN,
31608                __tmp.remaining(),
31609            )
31610        }
31611        for val in &self.ssid {
31612            __tmp.put_u8(*val);
31613        }
31614        for val in &self.password {
31615            __tmp.put_u8(*val);
31616        }
31617        __tmp.put_i8(self.mode as i8);
31618        __tmp.put_i8(self.response as i8);
31619        if matches!(version, MavlinkVersion::V2) {
31620            let len = __tmp.len();
31621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31622        } else {
31623            __tmp.len()
31624        }
31625    }
31626}
31627#[doc = "id: 9005"]
31628#[doc = "Winch status."]
31629#[derive(Debug, Clone, PartialEq)]
31630#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31631#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31632pub struct WINCH_STATUS_DATA {
31633    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31634    pub time_usec: u64,
31635    #[doc = "Length of line released. NaN if unknown"]
31636    pub line_length: f32,
31637    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31638    pub speed: f32,
31639    #[doc = "Tension on the line. NaN if unknown"]
31640    pub tension: f32,
31641    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31642    pub voltage: f32,
31643    #[doc = "Current draw from the winch. NaN if unknown"]
31644    pub current: f32,
31645    #[doc = "Status flags"]
31646    pub status: MavWinchStatusFlag,
31647    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31648    pub temperature: i16,
31649}
31650impl WINCH_STATUS_DATA {
31651    pub const ENCODED_LEN: usize = 34usize;
31652    pub const DEFAULT: Self = Self {
31653        time_usec: 0_u64,
31654        line_length: 0.0_f32,
31655        speed: 0.0_f32,
31656        tension: 0.0_f32,
31657        voltage: 0.0_f32,
31658        current: 0.0_f32,
31659        status: MavWinchStatusFlag::DEFAULT,
31660        temperature: 0_i16,
31661    };
31662    #[cfg(feature = "arbitrary")]
31663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31664        use arbitrary::{Arbitrary, Unstructured};
31665        let mut buf = [0u8; 1024];
31666        rng.fill_bytes(&mut buf);
31667        let mut unstructured = Unstructured::new(&buf);
31668        Self::arbitrary(&mut unstructured).unwrap_or_default()
31669    }
31670}
31671impl Default for WINCH_STATUS_DATA {
31672    fn default() -> Self {
31673        Self::DEFAULT.clone()
31674    }
31675}
31676impl MessageData for WINCH_STATUS_DATA {
31677    type Message = MavMessage;
31678    const ID: u32 = 9005u32;
31679    const NAME: &'static str = "WINCH_STATUS";
31680    const EXTRA_CRC: u8 = 117u8;
31681    const ENCODED_LEN: usize = 34usize;
31682    fn deser(
31683        _version: MavlinkVersion,
31684        __input: &[u8],
31685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31686        let avail_len = __input.len();
31687        let mut payload_buf = [0; Self::ENCODED_LEN];
31688        let mut buf = if avail_len < Self::ENCODED_LEN {
31689            payload_buf[0..avail_len].copy_from_slice(__input);
31690            Bytes::new(&payload_buf)
31691        } else {
31692            Bytes::new(__input)
31693        };
31694        let mut __struct = Self::default();
31695        __struct.time_usec = buf.get_u64_le();
31696        __struct.line_length = buf.get_f32_le();
31697        __struct.speed = buf.get_f32_le();
31698        __struct.tension = buf.get_f32_le();
31699        __struct.voltage = buf.get_f32_le();
31700        __struct.current = buf.get_f32_le();
31701        let tmp = buf.get_u32_le();
31702        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31703            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31704                flag_type: "MavWinchStatusFlag",
31705                value: tmp as u32,
31706            })?;
31707        __struct.temperature = buf.get_i16_le();
31708        Ok(__struct)
31709    }
31710    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31711        let mut __tmp = BytesMut::new(bytes);
31712        #[allow(clippy::absurd_extreme_comparisons)]
31713        #[allow(unused_comparisons)]
31714        if __tmp.remaining() < Self::ENCODED_LEN {
31715            panic!(
31716                "buffer is too small (need {} bytes, but got {})",
31717                Self::ENCODED_LEN,
31718                __tmp.remaining(),
31719            )
31720        }
31721        __tmp.put_u64_le(self.time_usec);
31722        __tmp.put_f32_le(self.line_length);
31723        __tmp.put_f32_le(self.speed);
31724        __tmp.put_f32_le(self.tension);
31725        __tmp.put_f32_le(self.voltage);
31726        __tmp.put_f32_le(self.current);
31727        __tmp.put_u32_le(self.status.bits());
31728        __tmp.put_i16_le(self.temperature);
31729        if matches!(version, MavlinkVersion::V2) {
31730            let len = __tmp.len();
31731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31732        } else {
31733            __tmp.len()
31734        }
31735    }
31736}
31737#[doc = "id: 231"]
31738#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31739#[derive(Debug, Clone, PartialEq)]
31740#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31741#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31742pub struct WIND_COV_DATA {
31743    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31744    pub time_usec: u64,
31745    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31746    pub wind_x: f32,
31747    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31748    pub wind_y: f32,
31749    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31750    pub wind_z: f32,
31751    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31752    pub var_horiz: f32,
31753    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31754    pub var_vert: f32,
31755    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31756    pub wind_alt: f32,
31757    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31758    pub horiz_accuracy: f32,
31759    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31760    pub vert_accuracy: f32,
31761}
31762impl WIND_COV_DATA {
31763    pub const ENCODED_LEN: usize = 40usize;
31764    pub const DEFAULT: Self = Self {
31765        time_usec: 0_u64,
31766        wind_x: 0.0_f32,
31767        wind_y: 0.0_f32,
31768        wind_z: 0.0_f32,
31769        var_horiz: 0.0_f32,
31770        var_vert: 0.0_f32,
31771        wind_alt: 0.0_f32,
31772        horiz_accuracy: 0.0_f32,
31773        vert_accuracy: 0.0_f32,
31774    };
31775    #[cfg(feature = "arbitrary")]
31776    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31777        use arbitrary::{Arbitrary, Unstructured};
31778        let mut buf = [0u8; 1024];
31779        rng.fill_bytes(&mut buf);
31780        let mut unstructured = Unstructured::new(&buf);
31781        Self::arbitrary(&mut unstructured).unwrap_or_default()
31782    }
31783}
31784impl Default for WIND_COV_DATA {
31785    fn default() -> Self {
31786        Self::DEFAULT.clone()
31787    }
31788}
31789impl MessageData for WIND_COV_DATA {
31790    type Message = MavMessage;
31791    const ID: u32 = 231u32;
31792    const NAME: &'static str = "WIND_COV";
31793    const EXTRA_CRC: u8 = 105u8;
31794    const ENCODED_LEN: usize = 40usize;
31795    fn deser(
31796        _version: MavlinkVersion,
31797        __input: &[u8],
31798    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31799        let avail_len = __input.len();
31800        let mut payload_buf = [0; Self::ENCODED_LEN];
31801        let mut buf = if avail_len < Self::ENCODED_LEN {
31802            payload_buf[0..avail_len].copy_from_slice(__input);
31803            Bytes::new(&payload_buf)
31804        } else {
31805            Bytes::new(__input)
31806        };
31807        let mut __struct = Self::default();
31808        __struct.time_usec = buf.get_u64_le();
31809        __struct.wind_x = buf.get_f32_le();
31810        __struct.wind_y = buf.get_f32_le();
31811        __struct.wind_z = buf.get_f32_le();
31812        __struct.var_horiz = buf.get_f32_le();
31813        __struct.var_vert = buf.get_f32_le();
31814        __struct.wind_alt = buf.get_f32_le();
31815        __struct.horiz_accuracy = buf.get_f32_le();
31816        __struct.vert_accuracy = buf.get_f32_le();
31817        Ok(__struct)
31818    }
31819    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31820        let mut __tmp = BytesMut::new(bytes);
31821        #[allow(clippy::absurd_extreme_comparisons)]
31822        #[allow(unused_comparisons)]
31823        if __tmp.remaining() < Self::ENCODED_LEN {
31824            panic!(
31825                "buffer is too small (need {} bytes, but got {})",
31826                Self::ENCODED_LEN,
31827                __tmp.remaining(),
31828            )
31829        }
31830        __tmp.put_u64_le(self.time_usec);
31831        __tmp.put_f32_le(self.wind_x);
31832        __tmp.put_f32_le(self.wind_y);
31833        __tmp.put_f32_le(self.wind_z);
31834        __tmp.put_f32_le(self.var_horiz);
31835        __tmp.put_f32_le(self.var_vert);
31836        __tmp.put_f32_le(self.wind_alt);
31837        __tmp.put_f32_le(self.horiz_accuracy);
31838        __tmp.put_f32_le(self.vert_accuracy);
31839        if matches!(version, MavlinkVersion::V2) {
31840            let len = __tmp.len();
31841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31842        } else {
31843            __tmp.len()
31844        }
31845    }
31846}
31847#[derive(Clone, PartialEq, Debug)]
31848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31849#[cfg_attr(feature = "serde", serde(tag = "type"))]
31850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31851#[repr(u32)]
31852pub enum MavMessage {
31853    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31854    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31855    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31856    AIS_VESSEL(AIS_VESSEL_DATA),
31857    ALTITUDE(ALTITUDE_DATA),
31858    ARRAY_TEST_0(ARRAY_TEST_0_DATA),
31859    ARRAY_TEST_1(ARRAY_TEST_1_DATA),
31860    ARRAY_TEST_3(ARRAY_TEST_3_DATA),
31861    ARRAY_TEST_4(ARRAY_TEST_4_DATA),
31862    ARRAY_TEST_5(ARRAY_TEST_5_DATA),
31863    ARRAY_TEST_6(ARRAY_TEST_6_DATA),
31864    ARRAY_TEST_7(ARRAY_TEST_7_DATA),
31865    ARRAY_TEST_8(ARRAY_TEST_8_DATA),
31866    ATTITUDE(ATTITUDE_DATA),
31867    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31868    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31869    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31870    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31871    AUTH_KEY(AUTH_KEY_DATA),
31872    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31873    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31874    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31875    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31876    BATTERY_INFO(BATTERY_INFO_DATA),
31877    BATTERY_STATUS(BATTERY_STATUS_DATA),
31878    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31879    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31880    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31881    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31882    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31883    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31884    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31885    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31886    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31887    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31888    CANFD_FRAME(CANFD_FRAME_DATA),
31889    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31890    CAN_FRAME(CAN_FRAME_DATA),
31891    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31892    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31893    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31894    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31895    COLLISION(COLLISION_DATA),
31896    COMMAND_ACK(COMMAND_ACK_DATA),
31897    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31898    COMMAND_INT(COMMAND_INT_DATA),
31899    COMMAND_LONG(COMMAND_LONG_DATA),
31900    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
31901    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31902    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31903    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31904    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31905    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31906    CURRENT_MODE(CURRENT_MODE_DATA),
31907    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
31908    DATA_STREAM(DATA_STREAM_DATA),
31909    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31910    DEBUG(DEBUG_DATA),
31911    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31912    DEBUG_VECT(DEBUG_VECT_DATA),
31913    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31914    EFI_STATUS(EFI_STATUS_DATA),
31915    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31916    ESC_INFO(ESC_INFO_DATA),
31917    ESC_STATUS(ESC_STATUS_DATA),
31918    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31919    EVENT(EVENT_DATA),
31920    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31921    FENCE_STATUS(FENCE_STATUS_DATA),
31922    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31923    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31924    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31925    FUEL_STATUS(FUEL_STATUS_DATA),
31926    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31927    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31928    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31929    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31930    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31931    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31932    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31933    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31934    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31935    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31936    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31937    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31938    GPS2_RAW(GPS2_RAW_DATA),
31939    GPS2_RTK(GPS2_RTK_DATA),
31940    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31941    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
31942    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31943    GPS_INPUT(GPS_INPUT_DATA),
31944    GPS_RAW_INT(GPS_RAW_INT_DATA),
31945    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31946    GPS_RTK(GPS_RTK_DATA),
31947    GPS_STATUS(GPS_STATUS_DATA),
31948    HEARTBEAT(HEARTBEAT_DATA),
31949    HIGHRES_IMU(HIGHRES_IMU_DATA),
31950    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
31951    HIGH_LATENCY(HIGH_LATENCY_DATA),
31952    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31953    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31954    HIL_CONTROLS(HIL_CONTROLS_DATA),
31955    HIL_GPS(HIL_GPS_DATA),
31956    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31957    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31958    HIL_SENSOR(HIL_SENSOR_DATA),
31959    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
31960    HIL_STATE(HIL_STATE_DATA),
31961    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31962    HOME_POSITION(HOME_POSITION_DATA),
31963    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31964    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31965    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31966    LANDING_TARGET(LANDING_TARGET_DATA),
31967    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31968    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31969    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31970    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31971    LOGGING_ACK(LOGGING_ACK_DATA),
31972    LOGGING_DATA(LOGGING_DATA_DATA),
31973    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31974    LOG_DATA(LOG_DATA_DATA),
31975    LOG_ENTRY(LOG_ENTRY_DATA),
31976    LOG_ERASE(LOG_ERASE_DATA),
31977    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31978    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31979    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31980    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31981    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31982    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31983    MEMORY_VECT(MEMORY_VECT_DATA),
31984    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31985    MISSION_ACK(MISSION_ACK_DATA),
31986    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31987    MISSION_COUNT(MISSION_COUNT_DATA),
31988    MISSION_CURRENT(MISSION_CURRENT_DATA),
31989    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
31990    MISSION_ITEM(MISSION_ITEM_DATA),
31991    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31992    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31993    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
31994    MISSION_REQUEST(MISSION_REQUEST_DATA),
31995    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31996    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31997    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31998    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
31999    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
32000    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
32001    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
32002    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
32003    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
32004    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
32005    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
32006    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
32007    ODOMETRY(ODOMETRY_DATA),
32008    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
32009    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
32010    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
32011    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
32012    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
32013    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
32014    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
32015    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
32016    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
32017    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
32018    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
32019    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
32020    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
32021    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
32022    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
32023    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
32024    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
32025    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
32026    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
32027    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
32028    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
32029    PARAM_SET(PARAM_SET_DATA),
32030    PARAM_VALUE(PARAM_VALUE_DATA),
32031    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
32032    PING(PING_DATA),
32033    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
32034    PLAY_TUNE(PLAY_TUNE_DATA),
32035    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
32036    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
32037    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
32038    POWER_STATUS(POWER_STATUS_DATA),
32039    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
32040    RADIO_STATUS(RADIO_STATUS_DATA),
32041    RAW_IMU(RAW_IMU_DATA),
32042    RAW_PRESSURE(RAW_PRESSURE_DATA),
32043    RAW_RPM(RAW_RPM_DATA),
32044    RC_CHANNELS(RC_CHANNELS_DATA),
32045    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
32046    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
32047    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
32048    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
32049    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
32050    REQUEST_EVENT(REQUEST_EVENT_DATA),
32051    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
32052    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
32053    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
32054    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
32055    SCALED_IMU(SCALED_IMU_DATA),
32056    SCALED_IMU2(SCALED_IMU2_DATA),
32057    SCALED_IMU3(SCALED_IMU3_DATA),
32058    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
32059    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
32060    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
32061    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
32062    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
32063    SETUP_SIGNING(SETUP_SIGNING_DATA),
32064    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
32065    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
32066    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
32067    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
32068    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
32069    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
32070    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
32071    SET_MODE(SET_MODE_DATA),
32072    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
32073    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
32074    SIM_STATE(SIM_STATE_DATA),
32075    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
32076    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
32077    STATUSTEXT(STATUSTEXT_DATA),
32078    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
32079    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
32080    SYSTEM_TIME(SYSTEM_TIME_DATA),
32081    SYS_STATUS(SYS_STATUS_DATA),
32082    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
32083    TERRAIN_DATA(TERRAIN_DATA_DATA),
32084    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
32085    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
32086    TIMESYNC(TIMESYNC_DATA),
32087    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
32088    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
32089    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
32090    TUNNEL(TUNNEL_DATA),
32091    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
32092    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
32093    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
32094    V2_EXTENSION(V2_EXTENSION_DATA),
32095    VFR_HUD(VFR_HUD_DATA),
32096    VIBRATION(VIBRATION_DATA),
32097    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
32098    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
32099    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
32100    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
32101    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
32102    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
32103    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
32104    WINCH_STATUS(WINCH_STATUS_DATA),
32105    WIND_COV(WIND_COV_DATA),
32106}
32107impl MavMessage {
32108    pub const fn all_ids() -> &'static [u32] {
32109        &[
32110            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
32111            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
32112            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
32113            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
32114            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
32115            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
32116            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
32117            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
32118            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
32119            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
32120            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
32121            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
32122            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
32123            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
32124            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
32125            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
32126            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
32127            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
32128            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
32129            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
32130            12915u32, 12918u32, 12919u32, 12920u32, 17150u32, 17151u32, 17153u32, 17154u32,
32131            17155u32, 17156u32, 17157u32, 17158u32,
32132        ]
32133    }
32134}
32135impl Message for MavMessage {
32136    fn parse(
32137        version: MavlinkVersion,
32138        id: u32,
32139        payload: &[u8],
32140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32141        match id {
32142            ACTUATOR_CONTROL_TARGET_DATA::ID => {
32143                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32144                    .map(Self::ACTUATOR_CONTROL_TARGET)
32145            }
32146            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
32147                .map(Self::ACTUATOR_OUTPUT_STATUS),
32148            ADSB_VEHICLE_DATA::ID => {
32149                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
32150            }
32151            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
32152            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
32153            ARRAY_TEST_0_DATA::ID => {
32154                ARRAY_TEST_0_DATA::deser(version, payload).map(Self::ARRAY_TEST_0)
32155            }
32156            ARRAY_TEST_1_DATA::ID => {
32157                ARRAY_TEST_1_DATA::deser(version, payload).map(Self::ARRAY_TEST_1)
32158            }
32159            ARRAY_TEST_3_DATA::ID => {
32160                ARRAY_TEST_3_DATA::deser(version, payload).map(Self::ARRAY_TEST_3)
32161            }
32162            ARRAY_TEST_4_DATA::ID => {
32163                ARRAY_TEST_4_DATA::deser(version, payload).map(Self::ARRAY_TEST_4)
32164            }
32165            ARRAY_TEST_5_DATA::ID => {
32166                ARRAY_TEST_5_DATA::deser(version, payload).map(Self::ARRAY_TEST_5)
32167            }
32168            ARRAY_TEST_6_DATA::ID => {
32169                ARRAY_TEST_6_DATA::deser(version, payload).map(Self::ARRAY_TEST_6)
32170            }
32171            ARRAY_TEST_7_DATA::ID => {
32172                ARRAY_TEST_7_DATA::deser(version, payload).map(Self::ARRAY_TEST_7)
32173            }
32174            ARRAY_TEST_8_DATA::ID => {
32175                ARRAY_TEST_8_DATA::deser(version, payload).map(Self::ARRAY_TEST_8)
32176            }
32177            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
32178            ATTITUDE_QUATERNION_DATA::ID => {
32179                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
32180            }
32181            ATTITUDE_QUATERNION_COV_DATA::ID => {
32182                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
32183                    .map(Self::ATTITUDE_QUATERNION_COV)
32184            }
32185            ATTITUDE_TARGET_DATA::ID => {
32186                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
32187            }
32188            ATT_POS_MOCAP_DATA::ID => {
32189                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
32190            }
32191            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
32192            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
32193                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
32194                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
32195            }
32196            AUTOPILOT_VERSION_DATA::ID => {
32197                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
32198            }
32199            AVAILABLE_MODES_DATA::ID => {
32200                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
32201            }
32202            AVAILABLE_MODES_MONITOR_DATA::ID => {
32203                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
32204                    .map(Self::AVAILABLE_MODES_MONITOR)
32205            }
32206            BATTERY_INFO_DATA::ID => {
32207                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
32208            }
32209            BATTERY_STATUS_DATA::ID => {
32210                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
32211            }
32212            BUTTON_CHANGE_DATA::ID => {
32213                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
32214            }
32215            CAMERA_CAPTURE_STATUS_DATA::ID => {
32216                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
32217            }
32218            CAMERA_FOV_STATUS_DATA::ID => {
32219                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
32220            }
32221            CAMERA_IMAGE_CAPTURED_DATA::ID => {
32222                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
32223            }
32224            CAMERA_INFORMATION_DATA::ID => {
32225                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
32226            }
32227            CAMERA_SETTINGS_DATA::ID => {
32228                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
32229            }
32230            CAMERA_THERMAL_RANGE_DATA::ID => {
32231                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
32232            }
32233            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
32234                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
32235                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
32236            }
32237            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
32238                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
32239                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
32240            }
32241            CAMERA_TRIGGER_DATA::ID => {
32242                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
32243            }
32244            CANFD_FRAME_DATA::ID => {
32245                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
32246            }
32247            CAN_FILTER_MODIFY_DATA::ID => {
32248                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
32249            }
32250            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
32251            CELLULAR_CONFIG_DATA::ID => {
32252                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
32253            }
32254            CELLULAR_STATUS_DATA::ID => {
32255                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
32256            }
32257            CHANGE_OPERATOR_CONTROL_DATA::ID => {
32258                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
32259                    .map(Self::CHANGE_OPERATOR_CONTROL)
32260            }
32261            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
32262                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
32263                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
32264            }
32265            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
32266            COMMAND_ACK_DATA::ID => {
32267                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
32268            }
32269            COMMAND_CANCEL_DATA::ID => {
32270                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
32271            }
32272            COMMAND_INT_DATA::ID => {
32273                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
32274            }
32275            COMMAND_LONG_DATA::ID => {
32276                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
32277            }
32278            COMPONENT_INFORMATION_DATA::ID => {
32279                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
32280            }
32281            COMPONENT_INFORMATION_BASIC_DATA::ID => {
32282                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
32283                    .map(Self::COMPONENT_INFORMATION_BASIC)
32284            }
32285            COMPONENT_METADATA_DATA::ID => {
32286                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
32287            }
32288            CONTROL_SYSTEM_STATE_DATA::ID => {
32289                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
32290            }
32291            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
32292                .map(Self::CURRENT_EVENT_SEQUENCE),
32293            CURRENT_MODE_DATA::ID => {
32294                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
32295            }
32296            DATA_STREAM_DATA::ID => {
32297                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
32298            }
32299            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
32300                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
32301                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
32302            }
32303            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
32304            DEBUG_FLOAT_ARRAY_DATA::ID => {
32305                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
32306            }
32307            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
32308            DISTANCE_SENSOR_DATA::ID => {
32309                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
32310            }
32311            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
32312            ENCAPSULATED_DATA_DATA::ID => {
32313                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
32314            }
32315            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
32316            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
32317            ESTIMATOR_STATUS_DATA::ID => {
32318                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
32319            }
32320            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
32321            EXTENDED_SYS_STATE_DATA::ID => {
32322                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
32323            }
32324            FENCE_STATUS_DATA::ID => {
32325                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
32326            }
32327            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
32328                .map(Self::FILE_TRANSFER_PROTOCOL),
32329            FLIGHT_INFORMATION_DATA::ID => {
32330                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
32331            }
32332            FOLLOW_TARGET_DATA::ID => {
32333                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
32334            }
32335            FUEL_STATUS_DATA::ID => {
32336                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
32337            }
32338            GENERATOR_STATUS_DATA::ID => {
32339                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
32340            }
32341            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
32342                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
32343                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
32344            }
32345            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
32346                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
32347                    .map(Self::GIMBAL_DEVICE_INFORMATION)
32348            }
32349            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
32350                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
32351                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
32352            }
32353            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
32354                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
32355                    .map(Self::GIMBAL_MANAGER_INFORMATION)
32356            }
32357            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
32358                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
32359                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
32360            }
32361            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
32362                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
32363                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
32364            }
32365            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
32366                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
32367                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
32368            }
32369            GIMBAL_MANAGER_STATUS_DATA::ID => {
32370                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
32371            }
32372            GLOBAL_POSITION_INT_DATA::ID => {
32373                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
32374            }
32375            GLOBAL_POSITION_INT_COV_DATA::ID => {
32376                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
32377                    .map(Self::GLOBAL_POSITION_INT_COV)
32378            }
32379            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
32380                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32381                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
32382            }
32383            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
32384            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
32385            GPS_GLOBAL_ORIGIN_DATA::ID => {
32386                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
32387            }
32388            GPS_INJECT_DATA_DATA::ID => {
32389                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
32390            }
32391            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
32392            GPS_RAW_INT_DATA::ID => {
32393                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
32394            }
32395            GPS_RTCM_DATA_DATA::ID => {
32396                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
32397            }
32398            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
32399            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
32400            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
32401            HIGHRES_IMU_DATA::ID => {
32402                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
32403            }
32404            HIGH_LATENCY_DATA::ID => {
32405                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
32406            }
32407            HIGH_LATENCY2_DATA::ID => {
32408                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
32409            }
32410            HIL_ACTUATOR_CONTROLS_DATA::ID => {
32411                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
32412            }
32413            HIL_CONTROLS_DATA::ID => {
32414                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
32415            }
32416            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
32417            HIL_OPTICAL_FLOW_DATA::ID => {
32418                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
32419            }
32420            HIL_RC_INPUTS_RAW_DATA::ID => {
32421                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
32422            }
32423            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
32424            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
32425            HIL_STATE_QUATERNION_DATA::ID => {
32426                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
32427            }
32428            HOME_POSITION_DATA::ID => {
32429                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
32430            }
32431            HYGROMETER_SENSOR_DATA::ID => {
32432                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
32433            }
32434            ILLUMINATOR_STATUS_DATA::ID => {
32435                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
32436            }
32437            ISBD_LINK_STATUS_DATA::ID => {
32438                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
32439            }
32440            LANDING_TARGET_DATA::ID => {
32441                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
32442            }
32443            LINK_NODE_STATUS_DATA::ID => {
32444                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
32445            }
32446            LOCAL_POSITION_NED_DATA::ID => {
32447                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
32448            }
32449            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
32450                .map(Self::LOCAL_POSITION_NED_COV),
32451            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
32452                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
32453                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
32454            }
32455            LOGGING_ACK_DATA::ID => {
32456                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
32457            }
32458            LOGGING_DATA_DATA::ID => {
32459                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
32460            }
32461            LOGGING_DATA_ACKED_DATA::ID => {
32462                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
32463            }
32464            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
32465            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
32466            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
32467            LOG_REQUEST_DATA_DATA::ID => {
32468                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
32469            }
32470            LOG_REQUEST_END_DATA::ID => {
32471                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
32472            }
32473            LOG_REQUEST_LIST_DATA::ID => {
32474                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
32475            }
32476            MAG_CAL_REPORT_DATA::ID => {
32477                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
32478            }
32479            MANUAL_CONTROL_DATA::ID => {
32480                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
32481            }
32482            MANUAL_SETPOINT_DATA::ID => {
32483                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
32484            }
32485            MEMORY_VECT_DATA::ID => {
32486                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
32487            }
32488            MESSAGE_INTERVAL_DATA::ID => {
32489                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
32490            }
32491            MISSION_ACK_DATA::ID => {
32492                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
32493            }
32494            MISSION_CLEAR_ALL_DATA::ID => {
32495                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
32496            }
32497            MISSION_COUNT_DATA::ID => {
32498                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
32499            }
32500            MISSION_CURRENT_DATA::ID => {
32501                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
32502            }
32503            MISSION_ITEM_DATA::ID => {
32504                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
32505            }
32506            MISSION_ITEM_INT_DATA::ID => {
32507                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
32508            }
32509            MISSION_ITEM_REACHED_DATA::ID => {
32510                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
32511            }
32512            MISSION_REQUEST_DATA::ID => {
32513                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
32514            }
32515            MISSION_REQUEST_INT_DATA::ID => {
32516                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
32517            }
32518            MISSION_REQUEST_LIST_DATA::ID => {
32519                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
32520            }
32521            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
32522                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
32523                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
32524            }
32525            MISSION_SET_CURRENT_DATA::ID => {
32526                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
32527            }
32528            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
32529                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
32530                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
32531            }
32532            MOUNT_ORIENTATION_DATA::ID => {
32533                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32534            }
32535            NAMED_VALUE_FLOAT_DATA::ID => {
32536                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32537            }
32538            NAMED_VALUE_INT_DATA::ID => {
32539                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32540            }
32541            NAV_CONTROLLER_OUTPUT_DATA::ID => {
32542                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
32543            }
32544            OBSTACLE_DISTANCE_DATA::ID => {
32545                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
32546            }
32547            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32548            ONBOARD_COMPUTER_STATUS_DATA::ID => {
32549                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
32550                    .map(Self::ONBOARD_COMPUTER_STATUS)
32551            }
32552            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32553                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32554                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32555            }
32556            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
32557                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
32558                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
32559            }
32560            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32561                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32562            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
32563                .map(Self::OPEN_DRONE_ID_LOCATION),
32564            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
32565                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
32566                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
32567            }
32568            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32569                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32570                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32571            }
32572            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
32573                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
32574            }
32575            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32576                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32577            }
32578            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32579                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32580                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32581            }
32582            OPTICAL_FLOW_DATA::ID => {
32583                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32584            }
32585            OPTICAL_FLOW_RAD_DATA::ID => {
32586                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32587            }
32588            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32589                .map(Self::ORBIT_EXECUTION_STATUS),
32590            PARAM_EXT_ACK_DATA::ID => {
32591                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32592            }
32593            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
32594                .map(Self::PARAM_EXT_REQUEST_LIST),
32595            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
32596                .map(Self::PARAM_EXT_REQUEST_READ),
32597            PARAM_EXT_SET_DATA::ID => {
32598                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32599            }
32600            PARAM_EXT_VALUE_DATA::ID => {
32601                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
32602            }
32603            PARAM_MAP_RC_DATA::ID => {
32604                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
32605            }
32606            PARAM_REQUEST_LIST_DATA::ID => {
32607                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
32608            }
32609            PARAM_REQUEST_READ_DATA::ID => {
32610                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32611            }
32612            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32613            PARAM_VALUE_DATA::ID => {
32614                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
32615            }
32616            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32617            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
32618            PLAY_TUNE_V2_DATA::ID => {
32619                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32620            }
32621            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32622                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32623                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32624            }
32625            POSITION_TARGET_LOCAL_NED_DATA::ID => {
32626                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32627                    .map(Self::POSITION_TARGET_LOCAL_NED)
32628            }
32629            POWER_STATUS_DATA::ID => {
32630                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
32631            }
32632            PROTOCOL_VERSION_DATA::ID => {
32633                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32634            }
32635            RADIO_STATUS_DATA::ID => {
32636                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32637            }
32638            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32639            RAW_PRESSURE_DATA::ID => {
32640                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32641            }
32642            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
32643            RC_CHANNELS_DATA::ID => {
32644                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32645            }
32646            RC_CHANNELS_OVERRIDE_DATA::ID => {
32647                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32648            }
32649            RC_CHANNELS_RAW_DATA::ID => {
32650                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32651            }
32652            RC_CHANNELS_SCALED_DATA::ID => {
32653                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32654            }
32655            REQUEST_DATA_STREAM_DATA::ID => {
32656                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32657            }
32658            REQUEST_EVENT_DATA::ID => {
32659                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32660            }
32661            RESOURCE_REQUEST_DATA::ID => {
32662                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32663            }
32664            RESPONSE_EVENT_ERROR_DATA::ID => {
32665                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
32666            }
32667            SAFETY_ALLOWED_AREA_DATA::ID => {
32668                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32669            }
32670            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
32671                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
32672                    .map(Self::SAFETY_SET_ALLOWED_AREA)
32673            }
32674            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32675            SCALED_IMU2_DATA::ID => {
32676                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32677            }
32678            SCALED_IMU3_DATA::ID => {
32679                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32680            }
32681            SCALED_PRESSURE_DATA::ID => {
32682                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32683            }
32684            SCALED_PRESSURE2_DATA::ID => {
32685                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
32686            }
32687            SCALED_PRESSURE3_DATA::ID => {
32688                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32689            }
32690            SERIAL_CONTROL_DATA::ID => {
32691                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32692            }
32693            SERVO_OUTPUT_RAW_DATA::ID => {
32694                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32695            }
32696            SETUP_SIGNING_DATA::ID => {
32697                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
32698            }
32699            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
32700                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32701                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
32702            }
32703            SET_ATTITUDE_TARGET_DATA::ID => {
32704                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32705            }
32706            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
32707                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
32708            }
32709            SET_HOME_POSITION_DATA::ID => {
32710                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
32711            }
32712            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32713            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32714                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32715                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32716            }
32717            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32718                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32719                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32720            }
32721            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
32722            SMART_BATTERY_INFO_DATA::ID => {
32723                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32724            }
32725            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32726            STORAGE_INFORMATION_DATA::ID => {
32727                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
32728            }
32729            SUPPORTED_TUNES_DATA::ID => {
32730                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32731            }
32732            SYSTEM_TIME_DATA::ID => {
32733                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32734            }
32735            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
32736            TERRAIN_CHECK_DATA::ID => {
32737                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32738            }
32739            TERRAIN_DATA_DATA::ID => {
32740                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
32741            }
32742            TERRAIN_REPORT_DATA::ID => {
32743                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
32744            }
32745            TERRAIN_REQUEST_DATA::ID => {
32746                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32747            }
32748            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32749            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32750                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32751                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32752            }
32753            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32754                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32755                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32756            }
32757            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32758                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
32759                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
32760            }
32761            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
32762            UAVCAN_NODE_INFO_DATA::ID => {
32763                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32764            }
32765            UAVCAN_NODE_STATUS_DATA::ID => {
32766                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32767            }
32768            UTM_GLOBAL_POSITION_DATA::ID => {
32769                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32770            }
32771            V2_EXTENSION_DATA::ID => {
32772                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
32773            }
32774            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
32775            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
32776            VICON_POSITION_ESTIMATE_DATA::ID => {
32777                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32778                    .map(Self::VICON_POSITION_ESTIMATE)
32779            }
32780            VIDEO_STREAM_INFORMATION_DATA::ID => {
32781                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32782                    .map(Self::VIDEO_STREAM_INFORMATION)
32783            }
32784            VIDEO_STREAM_STATUS_DATA::ID => {
32785                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
32786            }
32787            VISION_POSITION_ESTIMATE_DATA::ID => {
32788                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32789                    .map(Self::VISION_POSITION_ESTIMATE)
32790            }
32791            VISION_SPEED_ESTIMATE_DATA::ID => {
32792                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32793            }
32794            WHEEL_DISTANCE_DATA::ID => {
32795                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
32796            }
32797            WIFI_CONFIG_AP_DATA::ID => {
32798                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32799            }
32800            WINCH_STATUS_DATA::ID => {
32801                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32802            }
32803            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32804            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32805        }
32806    }
32807    fn message_name(&self) -> &'static str {
32808        match self {
32809            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32810            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32811            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32812            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32813            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32814            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::NAME,
32815            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::NAME,
32816            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::NAME,
32817            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::NAME,
32818            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::NAME,
32819            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::NAME,
32820            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::NAME,
32821            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::NAME,
32822            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32823            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32824            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32825            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32826            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32827            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32828            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32829                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32830            }
32831            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32832            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32833            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32834            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32835            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32836            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32837            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32838            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32839            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32840            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32841            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32842            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32843            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32844            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32845            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32846            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32847            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32848            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32849            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32850            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32851            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32852            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32853            Self::COLLISION(..) => COLLISION_DATA::NAME,
32854            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32855            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32856            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32857            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32858            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32859            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32860            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32861            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32862            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32863            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32864            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32865            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32866            Self::DEBUG(..) => DEBUG_DATA::NAME,
32867            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32868            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32869            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32870            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32871            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32872            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32873            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32874            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32875            Self::EVENT(..) => EVENT_DATA::NAME,
32876            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32877            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32878            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32879            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32880            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32881            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32882            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32883            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32884            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32885            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32886            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32887            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32888            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32889                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32890            }
32891            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32892            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32893            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32894            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32895            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32896            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32897            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32898            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32899            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32900            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32901            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32902            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32903            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32904            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32905            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32906            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32907            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32908            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32909            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32910            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32911            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32912            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32913            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32914            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32915            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32916            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32917            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32918            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32919            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32920            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32921            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32922            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32923            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32924            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32925            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32926                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32927            }
32928            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32929            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32930            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32931            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32932            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32933            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32934            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32935            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32936            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32937            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32938            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32939            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32940            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32941            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32942            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32943            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32944            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32945            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32946            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32947            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32948            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32949            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32950            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32951            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32952            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32953            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32954            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32955            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32956            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32957            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32958            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32959            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32960            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32961            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32962            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32963            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32964            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32965            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32966            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32967            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32968            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32969            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32970            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32971            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32972            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32973            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32974            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32975            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32976            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32977            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32978            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32979            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32980            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32981            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32982            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32983            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32984            Self::PING(..) => PING_DATA::NAME,
32985            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32986            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32987            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32988            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32989            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32990            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32991            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32992            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32993            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32994            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32995            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32996            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32997            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32998            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32999            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
33000            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
33001            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
33002            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
33003            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
33004            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
33005            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
33006            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
33007            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
33008            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
33009            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
33010            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
33011            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
33012            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
33013            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
33014            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
33015            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
33016            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
33017            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
33018            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
33019            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
33020            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
33021            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
33022            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
33023            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
33024            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
33025            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
33026            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
33027            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
33028            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
33029            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
33030            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
33031            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
33032            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
33033            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
33034            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
33035                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
33036            }
33037            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
33038                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
33039            }
33040            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
33041            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
33042            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
33043            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
33044            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
33045            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
33046            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
33047            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
33048            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
33049            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
33050            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
33051            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
33052            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
33053            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
33054            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
33055            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
33056        }
33057    }
33058    fn message_id(&self) -> u32 {
33059        match self {
33060            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
33061            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
33062            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
33063            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
33064            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
33065            Self::ARRAY_TEST_0(..) => ARRAY_TEST_0_DATA::ID,
33066            Self::ARRAY_TEST_1(..) => ARRAY_TEST_1_DATA::ID,
33067            Self::ARRAY_TEST_3(..) => ARRAY_TEST_3_DATA::ID,
33068            Self::ARRAY_TEST_4(..) => ARRAY_TEST_4_DATA::ID,
33069            Self::ARRAY_TEST_5(..) => ARRAY_TEST_5_DATA::ID,
33070            Self::ARRAY_TEST_6(..) => ARRAY_TEST_6_DATA::ID,
33071            Self::ARRAY_TEST_7(..) => ARRAY_TEST_7_DATA::ID,
33072            Self::ARRAY_TEST_8(..) => ARRAY_TEST_8_DATA::ID,
33073            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
33074            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
33075            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
33076            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
33077            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
33078            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
33079            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
33080                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
33081            }
33082            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
33083            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
33084            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
33085            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
33086            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
33087            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
33088            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
33089            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
33090            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
33091            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
33092            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
33093            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
33094            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
33095            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
33096            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
33097            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
33098            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
33099            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
33100            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
33101            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
33102            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
33103            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
33104            Self::COLLISION(..) => COLLISION_DATA::ID,
33105            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
33106            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
33107            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
33108            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
33109            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
33110            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
33111            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
33112            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
33113            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
33114            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
33115            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
33116            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
33117            Self::DEBUG(..) => DEBUG_DATA::ID,
33118            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
33119            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
33120            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
33121            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
33122            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
33123            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
33124            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
33125            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
33126            Self::EVENT(..) => EVENT_DATA::ID,
33127            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
33128            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
33129            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
33130            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
33131            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
33132            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
33133            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
33134            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
33135            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
33136            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
33137            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
33138            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
33139            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
33140                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
33141            }
33142            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
33143            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
33144            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
33145            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
33146            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
33147            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
33148            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
33149            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
33150            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
33151            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
33152            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
33153            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
33154            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
33155            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
33156            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
33157            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
33158            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
33159            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
33160            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
33161            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
33162            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
33163            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
33164            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
33165            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
33166            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
33167            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
33168            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
33169            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
33170            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
33171            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
33172            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
33173            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
33174            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
33175            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
33176            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
33177                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
33178            }
33179            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
33180            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
33181            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
33182            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
33183            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
33184            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
33185            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
33186            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
33187            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
33188            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
33189            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
33190            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
33191            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
33192            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
33193            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
33194            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
33195            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
33196            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
33197            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
33198            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
33199            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
33200            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
33201            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
33202            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
33203            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
33204            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
33205            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
33206            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
33207            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
33208            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
33209            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
33210            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
33211            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
33212            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
33213            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
33214            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
33215            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
33216            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
33217            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
33218            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
33219            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
33220            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
33221            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
33222            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
33223            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
33224            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
33225            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
33226            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
33227            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
33228            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
33229            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
33230            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
33231            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
33232            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
33233            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
33234            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
33235            Self::PING(..) => PING_DATA::ID,
33236            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
33237            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
33238            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
33239            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
33240            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
33241            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
33242            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
33243            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
33244            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
33245            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
33246            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
33247            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
33248            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
33249            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
33250            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
33251            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
33252            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
33253            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
33254            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
33255            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
33256            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
33257            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
33258            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
33259            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
33260            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
33261            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
33262            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
33263            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
33264            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
33265            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
33266            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
33267            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
33268            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
33269            Self::SET_MODE(..) => SET_MODE_DATA::ID,
33270            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
33271            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
33272            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
33273            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
33274            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
33275            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
33276            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
33277            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
33278            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
33279            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
33280            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
33281            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
33282            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
33283            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
33284            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
33285            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
33286            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
33287                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
33288            }
33289            Self::TUNNEL(..) => TUNNEL_DATA::ID,
33290            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
33291            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
33292            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
33293            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
33294            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
33295            Self::VIBRATION(..) => VIBRATION_DATA::ID,
33296            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
33297            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
33298            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
33299            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
33300            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
33301            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
33302            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
33303            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
33304            Self::WIND_COV(..) => WIND_COV_DATA::ID,
33305        }
33306    }
33307    fn message_id_from_name(name: &str) -> Option<u32> {
33308        match name {
33309            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
33310            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
33311            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
33312            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
33313            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
33314            ARRAY_TEST_0_DATA::NAME => Some(ARRAY_TEST_0_DATA::ID),
33315            ARRAY_TEST_1_DATA::NAME => Some(ARRAY_TEST_1_DATA::ID),
33316            ARRAY_TEST_3_DATA::NAME => Some(ARRAY_TEST_3_DATA::ID),
33317            ARRAY_TEST_4_DATA::NAME => Some(ARRAY_TEST_4_DATA::ID),
33318            ARRAY_TEST_5_DATA::NAME => Some(ARRAY_TEST_5_DATA::ID),
33319            ARRAY_TEST_6_DATA::NAME => Some(ARRAY_TEST_6_DATA::ID),
33320            ARRAY_TEST_7_DATA::NAME => Some(ARRAY_TEST_7_DATA::ID),
33321            ARRAY_TEST_8_DATA::NAME => Some(ARRAY_TEST_8_DATA::ID),
33322            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
33323            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
33324            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
33325            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
33326            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
33327            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
33328            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
33329                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
33330            }
33331            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
33332            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
33333            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
33334            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
33335            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
33336            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
33337            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
33338            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
33339            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
33340            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
33341            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
33342            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
33343            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
33344            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
33345            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
33346            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
33347            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
33348            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
33349            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
33350            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
33351            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
33352            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
33353            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
33354            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
33355            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
33356            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
33357            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
33358            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
33359            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
33360            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
33361            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
33362            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
33363            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
33364            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
33365            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
33366            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
33367            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
33368            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
33369            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
33370            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
33371            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
33372            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
33373            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
33374            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
33375            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
33376            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
33377            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
33378            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
33379            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
33380            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
33381            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
33382            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
33383            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
33384                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
33385            }
33386            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
33387            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
33388            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
33389            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
33390            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
33391                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
33392            }
33393            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
33394            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
33395            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
33396            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
33397            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
33398                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
33399            }
33400            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
33401            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
33402            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
33403            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
33404            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
33405            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
33406            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
33407            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
33408            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
33409            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
33410            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
33411            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
33412            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
33413            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
33414            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
33415            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
33416            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
33417            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
33418            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
33419            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
33420            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
33421            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
33422            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
33423            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
33424            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
33425            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
33426            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
33427            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
33428            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
33429            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
33430                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
33431            }
33432            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
33433            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
33434            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
33435            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
33436            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
33437            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
33438            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
33439            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
33440            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
33441            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
33442            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
33443            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
33444            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
33445            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
33446            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
33447            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
33448            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
33449            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
33450            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
33451            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
33452            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
33453            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
33454            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
33455            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
33456            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
33457            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
33458            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
33459            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
33460            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
33461            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
33462            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
33463            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
33464            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
33465            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
33466            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
33467            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
33468            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
33469            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
33470            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
33471            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
33472            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
33473            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
33474            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
33475            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
33476            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
33477            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
33478            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
33479            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
33480            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
33481            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
33482            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
33483            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
33484            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
33485            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
33486            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
33487            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
33488            PING_DATA::NAME => Some(PING_DATA::ID),
33489            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
33490            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
33491            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
33492            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
33493            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
33494            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
33495            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
33496            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
33497            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
33498            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
33499            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
33500            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
33501            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
33502            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
33503            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
33504            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
33505            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
33506            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
33507            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
33508            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
33509            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
33510            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
33511            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
33512            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
33513            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
33514            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
33515            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
33516            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
33517            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
33518            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
33519            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
33520            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
33521            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
33522            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
33523            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
33524                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
33525            }
33526            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
33527                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
33528            }
33529            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
33530            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
33531            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
33532            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
33533            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
33534            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
33535            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
33536            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
33537            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
33538            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
33539            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33540            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33541            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33542            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
33543                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
33544            }
33545            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
33546                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
33547            }
33548            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
33549            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
33550            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33551            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
33552            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
33553            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
33554            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
33555            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
33556            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33557            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
33558            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
33559            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
33560            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
33561            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
33562            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33563            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33564            _ => None,
33565        }
33566    }
33567    fn default_message_from_id(id: u32) -> Option<Self> {
33568        match id {
33569            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33570                ACTUATOR_CONTROL_TARGET_DATA::default(),
33571            )),
33572            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33573                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33574            )),
33575            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33576            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33577            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33578            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::default())),
33579            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::default())),
33580            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::default())),
33581            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::default())),
33582            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::default())),
33583            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::default())),
33584            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::default())),
33585            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::default())),
33586            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33587            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33588                ATTITUDE_QUATERNION_DATA::default(),
33589            )),
33590            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33591                ATTITUDE_QUATERNION_COV_DATA::default(),
33592            )),
33593            ATTITUDE_TARGET_DATA::ID => {
33594                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33595            }
33596            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33597            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33598            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33599                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33600                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33601                ))
33602            }
33603            AUTOPILOT_VERSION_DATA::ID => {
33604                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33605            }
33606            AVAILABLE_MODES_DATA::ID => {
33607                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33608            }
33609            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33610                AVAILABLE_MODES_MONITOR_DATA::default(),
33611            )),
33612            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33613            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33614            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33615            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33616                CAMERA_CAPTURE_STATUS_DATA::default(),
33617            )),
33618            CAMERA_FOV_STATUS_DATA::ID => {
33619                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33620            }
33621            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33622                CAMERA_IMAGE_CAPTURED_DATA::default(),
33623            )),
33624            CAMERA_INFORMATION_DATA::ID => {
33625                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33626            }
33627            CAMERA_SETTINGS_DATA::ID => {
33628                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33629            }
33630            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33631                CAMERA_THERMAL_RANGE_DATA::default(),
33632            )),
33633            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33634                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33635            )),
33636            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33637                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33638            )),
33639            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33640            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33641            CAN_FILTER_MODIFY_DATA::ID => {
33642                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33643            }
33644            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33645            CELLULAR_CONFIG_DATA::ID => {
33646                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33647            }
33648            CELLULAR_STATUS_DATA::ID => {
33649                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33650            }
33651            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33652                CHANGE_OPERATOR_CONTROL_DATA::default(),
33653            )),
33654            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33655                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33656            )),
33657            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33658            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33659            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33660            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33661            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33662            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33663                COMPONENT_INFORMATION_DATA::default(),
33664            )),
33665            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33666                COMPONENT_INFORMATION_BASIC_DATA::default(),
33667            )),
33668            COMPONENT_METADATA_DATA::ID => {
33669                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33670            }
33671            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33672                CONTROL_SYSTEM_STATE_DATA::default(),
33673            )),
33674            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33675                CURRENT_EVENT_SEQUENCE_DATA::default(),
33676            )),
33677            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33678            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33679            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33680                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33681            )),
33682            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33683            DEBUG_FLOAT_ARRAY_DATA::ID => {
33684                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33685            }
33686            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33687            DISTANCE_SENSOR_DATA::ID => {
33688                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33689            }
33690            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33691            ENCAPSULATED_DATA_DATA::ID => {
33692                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33693            }
33694            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33695            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33696            ESTIMATOR_STATUS_DATA::ID => {
33697                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33698            }
33699            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33700            EXTENDED_SYS_STATE_DATA::ID => {
33701                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33702            }
33703            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33704            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33705                FILE_TRANSFER_PROTOCOL_DATA::default(),
33706            )),
33707            FLIGHT_INFORMATION_DATA::ID => {
33708                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33709            }
33710            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33711            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33712            GENERATOR_STATUS_DATA::ID => {
33713                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33714            }
33715            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33716                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33717            )),
33718            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33719                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33720            )),
33721            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33722                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33723            )),
33724            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33725                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33726            )),
33727            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33728                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33729            )),
33730            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33731                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33732                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33733                ))
33734            }
33735            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33736                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33737            )),
33738            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33739                GIMBAL_MANAGER_STATUS_DATA::default(),
33740            )),
33741            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33742                GLOBAL_POSITION_INT_DATA::default(),
33743            )),
33744            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33745                GLOBAL_POSITION_INT_COV_DATA::default(),
33746            )),
33747            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33748                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33749                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33750                ))
33751            }
33752            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33753            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33754            GPS_GLOBAL_ORIGIN_DATA::ID => {
33755                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33756            }
33757            GPS_INJECT_DATA_DATA::ID => {
33758                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33759            }
33760            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33761            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33762            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33763            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33764            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33765            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33766            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33767            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33768            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33769            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33770                HIL_ACTUATOR_CONTROLS_DATA::default(),
33771            )),
33772            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33773            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33774            HIL_OPTICAL_FLOW_DATA::ID => {
33775                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33776            }
33777            HIL_RC_INPUTS_RAW_DATA::ID => {
33778                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33779            }
33780            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33781            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33782            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33783                HIL_STATE_QUATERNION_DATA::default(),
33784            )),
33785            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33786            HYGROMETER_SENSOR_DATA::ID => {
33787                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33788            }
33789            ILLUMINATOR_STATUS_DATA::ID => {
33790                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33791            }
33792            ISBD_LINK_STATUS_DATA::ID => {
33793                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33794            }
33795            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33796            LINK_NODE_STATUS_DATA::ID => {
33797                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33798            }
33799            LOCAL_POSITION_NED_DATA::ID => {
33800                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33801            }
33802            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33803                LOCAL_POSITION_NED_COV_DATA::default(),
33804            )),
33805            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33806                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33807                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33808                ))
33809            }
33810            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33811            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33812            LOGGING_DATA_ACKED_DATA::ID => {
33813                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33814            }
33815            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33816            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33817            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33818            LOG_REQUEST_DATA_DATA::ID => {
33819                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33820            }
33821            LOG_REQUEST_END_DATA::ID => {
33822                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33823            }
33824            LOG_REQUEST_LIST_DATA::ID => {
33825                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33826            }
33827            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33828            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33829            MANUAL_SETPOINT_DATA::ID => {
33830                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33831            }
33832            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33833            MESSAGE_INTERVAL_DATA::ID => {
33834                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33835            }
33836            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33837            MISSION_CLEAR_ALL_DATA::ID => {
33838                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33839            }
33840            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33841            MISSION_CURRENT_DATA::ID => {
33842                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33843            }
33844            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33845            MISSION_ITEM_INT_DATA::ID => {
33846                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
33847            }
33848            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33849                MISSION_ITEM_REACHED_DATA::default(),
33850            )),
33851            MISSION_REQUEST_DATA::ID => {
33852                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33853            }
33854            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33855                MISSION_REQUEST_INT_DATA::default(),
33856            )),
33857            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33858                MISSION_REQUEST_LIST_DATA::default(),
33859            )),
33860            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33861                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
33862            )),
33863            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33864                MISSION_SET_CURRENT_DATA::default(),
33865            )),
33866            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33867                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33868            )),
33869            MOUNT_ORIENTATION_DATA::ID => {
33870                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33871            }
33872            NAMED_VALUE_FLOAT_DATA::ID => {
33873                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33874            }
33875            NAMED_VALUE_INT_DATA::ID => {
33876                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33877            }
33878            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33879                NAV_CONTROLLER_OUTPUT_DATA::default(),
33880            )),
33881            OBSTACLE_DISTANCE_DATA::ID => {
33882                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33883            }
33884            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33885            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33886                ONBOARD_COMPUTER_STATUS_DATA::default(),
33887            )),
33888            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33889                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33890            )),
33891            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33892                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33893            )),
33894            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33895                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33896            )),
33897            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33898                OPEN_DRONE_ID_LOCATION_DATA::default(),
33899            )),
33900            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33901                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33902            )),
33903            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33904                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33905            )),
33906            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33907                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33908            )),
33909            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33910                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33911            )),
33912            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33913                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33914            )),
33915            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33916            OPTICAL_FLOW_RAD_DATA::ID => {
33917                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
33918            }
33919            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33920                ORBIT_EXECUTION_STATUS_DATA::default(),
33921            )),
33922            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33923            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33924                PARAM_EXT_REQUEST_LIST_DATA::default(),
33925            )),
33926            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33927                PARAM_EXT_REQUEST_READ_DATA::default(),
33928            )),
33929            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33930            PARAM_EXT_VALUE_DATA::ID => {
33931                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33932            }
33933            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33934            PARAM_REQUEST_LIST_DATA::ID => {
33935                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33936            }
33937            PARAM_REQUEST_READ_DATA::ID => {
33938                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33939            }
33940            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33941            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33942            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33943            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33944            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33945            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33946                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33947            )),
33948            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33949                POSITION_TARGET_LOCAL_NED_DATA::default(),
33950            )),
33951            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33952            PROTOCOL_VERSION_DATA::ID => {
33953                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33954            }
33955            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33956            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33957            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33958            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33959            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33960            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33961                RC_CHANNELS_OVERRIDE_DATA::default(),
33962            )),
33963            RC_CHANNELS_RAW_DATA::ID => {
33964                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33965            }
33966            RC_CHANNELS_SCALED_DATA::ID => {
33967                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33968            }
33969            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33970                REQUEST_DATA_STREAM_DATA::default(),
33971            )),
33972            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33973            RESOURCE_REQUEST_DATA::ID => {
33974                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33975            }
33976            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33977                RESPONSE_EVENT_ERROR_DATA::default(),
33978            )),
33979            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33980                SAFETY_ALLOWED_AREA_DATA::default(),
33981            )),
33982            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33983                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33984            )),
33985            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33986            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33987            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33988            SCALED_PRESSURE_DATA::ID => {
33989                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33990            }
33991            SCALED_PRESSURE2_DATA::ID => {
33992                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33993            }
33994            SCALED_PRESSURE3_DATA::ID => {
33995                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33996            }
33997            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33998            SERVO_OUTPUT_RAW_DATA::ID => {
33999                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
34000            }
34001            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
34002            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34003                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
34004            )),
34005            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34006                SET_ATTITUDE_TARGET_DATA::default(),
34007            )),
34008            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34009                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
34010            )),
34011            SET_HOME_POSITION_DATA::ID => {
34012                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
34013            }
34014            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
34015            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34016                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
34017            )),
34018            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34019                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
34020            )),
34021            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
34022            SMART_BATTERY_INFO_DATA::ID => {
34023                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
34024            }
34025            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
34026            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34027                STORAGE_INFORMATION_DATA::default(),
34028            )),
34029            SUPPORTED_TUNES_DATA::ID => {
34030                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
34031            }
34032            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
34033            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
34034            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
34035            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
34036            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
34037            TERRAIN_REQUEST_DATA::ID => {
34038                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
34039            }
34040            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
34041            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34042                TIME_ESTIMATE_TO_TARGET_DATA::default(),
34043            )),
34044            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34045                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34046                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
34047                ))
34048            }
34049            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34050                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34051                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
34052                ))
34053            }
34054            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
34055            UAVCAN_NODE_INFO_DATA::ID => {
34056                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
34057            }
34058            UAVCAN_NODE_STATUS_DATA::ID => {
34059                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
34060            }
34061            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34062                UTM_GLOBAL_POSITION_DATA::default(),
34063            )),
34064            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
34065            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
34066            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
34067            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34068                VICON_POSITION_ESTIMATE_DATA::default(),
34069            )),
34070            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34071                VIDEO_STREAM_INFORMATION_DATA::default(),
34072            )),
34073            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34074                VIDEO_STREAM_STATUS_DATA::default(),
34075            )),
34076            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34077                VISION_POSITION_ESTIMATE_DATA::default(),
34078            )),
34079            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34080                VISION_SPEED_ESTIMATE_DATA::default(),
34081            )),
34082            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
34083            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
34084            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
34085            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
34086            _ => None,
34087        }
34088    }
34089    #[cfg(feature = "arbitrary")]
34090    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
34091        match id {
34092            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34093                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34094            )),
34095            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34096                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
34097            )),
34098            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
34099            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
34100            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
34101            ARRAY_TEST_0_DATA::ID => Some(Self::ARRAY_TEST_0(ARRAY_TEST_0_DATA::random(rng))),
34102            ARRAY_TEST_1_DATA::ID => Some(Self::ARRAY_TEST_1(ARRAY_TEST_1_DATA::random(rng))),
34103            ARRAY_TEST_3_DATA::ID => Some(Self::ARRAY_TEST_3(ARRAY_TEST_3_DATA::random(rng))),
34104            ARRAY_TEST_4_DATA::ID => Some(Self::ARRAY_TEST_4(ARRAY_TEST_4_DATA::random(rng))),
34105            ARRAY_TEST_5_DATA::ID => Some(Self::ARRAY_TEST_5(ARRAY_TEST_5_DATA::random(rng))),
34106            ARRAY_TEST_6_DATA::ID => Some(Self::ARRAY_TEST_6(ARRAY_TEST_6_DATA::random(rng))),
34107            ARRAY_TEST_7_DATA::ID => Some(Self::ARRAY_TEST_7(ARRAY_TEST_7_DATA::random(rng))),
34108            ARRAY_TEST_8_DATA::ID => Some(Self::ARRAY_TEST_8(ARRAY_TEST_8_DATA::random(rng))),
34109            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
34110            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34111                ATTITUDE_QUATERNION_DATA::random(rng),
34112            )),
34113            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34114                ATTITUDE_QUATERNION_COV_DATA::random(rng),
34115            )),
34116            ATTITUDE_TARGET_DATA::ID => {
34117                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
34118            }
34119            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
34120            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
34121            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34122                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34123                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
34124                ))
34125            }
34126            AUTOPILOT_VERSION_DATA::ID => {
34127                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
34128            }
34129            AVAILABLE_MODES_DATA::ID => {
34130                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
34131            }
34132            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34133                AVAILABLE_MODES_MONITOR_DATA::random(rng),
34134            )),
34135            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
34136            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
34137            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
34138            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34139                CAMERA_CAPTURE_STATUS_DATA::random(rng),
34140            )),
34141            CAMERA_FOV_STATUS_DATA::ID => {
34142                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
34143            }
34144            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34145                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
34146            )),
34147            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
34148                CAMERA_INFORMATION_DATA::random(rng),
34149            )),
34150            CAMERA_SETTINGS_DATA::ID => {
34151                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
34152            }
34153            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
34154                CAMERA_THERMAL_RANGE_DATA::random(rng),
34155            )),
34156            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
34157                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
34158            )),
34159            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
34160                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
34161            )),
34162            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
34163            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
34164            CAN_FILTER_MODIFY_DATA::ID => {
34165                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
34166            }
34167            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
34168            CELLULAR_CONFIG_DATA::ID => {
34169                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
34170            }
34171            CELLULAR_STATUS_DATA::ID => {
34172                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
34173            }
34174            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
34175                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
34176            )),
34177            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
34178                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
34179            )),
34180            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
34181            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
34182            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
34183            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
34184            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
34185            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
34186                COMPONENT_INFORMATION_DATA::random(rng),
34187            )),
34188            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
34189                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
34190            )),
34191            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
34192                COMPONENT_METADATA_DATA::random(rng),
34193            )),
34194            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
34195                CONTROL_SYSTEM_STATE_DATA::random(rng),
34196            )),
34197            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
34198                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
34199            )),
34200            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
34201            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
34202            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
34203                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
34204            )),
34205            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
34206            DEBUG_FLOAT_ARRAY_DATA::ID => {
34207                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
34208            }
34209            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
34210            DISTANCE_SENSOR_DATA::ID => {
34211                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
34212            }
34213            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
34214            ENCAPSULATED_DATA_DATA::ID => {
34215                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
34216            }
34217            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
34218            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
34219            ESTIMATOR_STATUS_DATA::ID => {
34220                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
34221            }
34222            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
34223            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
34224                EXTENDED_SYS_STATE_DATA::random(rng),
34225            )),
34226            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
34227            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
34228                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
34229            )),
34230            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
34231                FLIGHT_INFORMATION_DATA::random(rng),
34232            )),
34233            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
34234            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
34235            GENERATOR_STATUS_DATA::ID => {
34236                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
34237            }
34238            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
34239                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
34240            )),
34241            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
34242                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
34243            )),
34244            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
34245                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
34246            )),
34247            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
34248                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
34249            )),
34250            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
34251                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
34252            )),
34253            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34254                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
34255                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
34256                ))
34257            }
34258            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
34259                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
34260            )),
34261            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
34262                GIMBAL_MANAGER_STATUS_DATA::random(rng),
34263            )),
34264            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
34265                GLOBAL_POSITION_INT_DATA::random(rng),
34266            )),
34267            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
34268                GLOBAL_POSITION_INT_COV_DATA::random(rng),
34269            )),
34270            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34271                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
34272                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
34273                ))
34274            }
34275            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
34276            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
34277            GPS_GLOBAL_ORIGIN_DATA::ID => {
34278                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
34279            }
34280            GPS_INJECT_DATA_DATA::ID => {
34281                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
34282            }
34283            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
34284            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
34285            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
34286            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
34287            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
34288            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
34289            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
34290            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
34291            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
34292            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
34293                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
34294            )),
34295            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
34296            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
34297            HIL_OPTICAL_FLOW_DATA::ID => {
34298                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
34299            }
34300            HIL_RC_INPUTS_RAW_DATA::ID => {
34301                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
34302            }
34303            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
34304            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
34305            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
34306                HIL_STATE_QUATERNION_DATA::random(rng),
34307            )),
34308            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
34309            HYGROMETER_SENSOR_DATA::ID => {
34310                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
34311            }
34312            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
34313                ILLUMINATOR_STATUS_DATA::random(rng),
34314            )),
34315            ISBD_LINK_STATUS_DATA::ID => {
34316                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
34317            }
34318            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
34319            LINK_NODE_STATUS_DATA::ID => {
34320                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
34321            }
34322            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
34323                LOCAL_POSITION_NED_DATA::random(rng),
34324            )),
34325            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
34326                LOCAL_POSITION_NED_COV_DATA::random(rng),
34327            )),
34328            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34329                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
34330                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
34331                ))
34332            }
34333            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
34334            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
34335            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
34336                LOGGING_DATA_ACKED_DATA::random(rng),
34337            )),
34338            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
34339            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
34340            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
34341            LOG_REQUEST_DATA_DATA::ID => {
34342                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
34343            }
34344            LOG_REQUEST_END_DATA::ID => {
34345                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
34346            }
34347            LOG_REQUEST_LIST_DATA::ID => {
34348                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
34349            }
34350            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
34351            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
34352            MANUAL_SETPOINT_DATA::ID => {
34353                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
34354            }
34355            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
34356            MESSAGE_INTERVAL_DATA::ID => {
34357                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
34358            }
34359            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
34360            MISSION_CLEAR_ALL_DATA::ID => {
34361                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
34362            }
34363            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
34364            MISSION_CURRENT_DATA::ID => {
34365                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
34366            }
34367            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
34368            MISSION_ITEM_INT_DATA::ID => {
34369                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
34370            }
34371            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
34372                MISSION_ITEM_REACHED_DATA::random(rng),
34373            )),
34374            MISSION_REQUEST_DATA::ID => {
34375                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
34376            }
34377            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
34378                MISSION_REQUEST_INT_DATA::random(rng),
34379            )),
34380            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
34381                MISSION_REQUEST_LIST_DATA::random(rng),
34382            )),
34383            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
34384                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
34385            )),
34386            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
34387                MISSION_SET_CURRENT_DATA::random(rng),
34388            )),
34389            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
34390                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
34391            )),
34392            MOUNT_ORIENTATION_DATA::ID => {
34393                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
34394            }
34395            NAMED_VALUE_FLOAT_DATA::ID => {
34396                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
34397            }
34398            NAMED_VALUE_INT_DATA::ID => {
34399                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
34400            }
34401            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
34402                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
34403            )),
34404            OBSTACLE_DISTANCE_DATA::ID => {
34405                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
34406            }
34407            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
34408            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
34409                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
34410            )),
34411            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
34412                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
34413            )),
34414            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
34415                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
34416            )),
34417            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
34418                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
34419            )),
34420            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
34421                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
34422            )),
34423            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
34424                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
34425            )),
34426            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
34427                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
34428            )),
34429            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
34430                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
34431            )),
34432            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
34433                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
34434            )),
34435            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
34436                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
34437            )),
34438            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
34439            OPTICAL_FLOW_RAD_DATA::ID => {
34440                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
34441            }
34442            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
34443                ORBIT_EXECUTION_STATUS_DATA::random(rng),
34444            )),
34445            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
34446            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
34447                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
34448            )),
34449            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
34450                PARAM_EXT_REQUEST_READ_DATA::random(rng),
34451            )),
34452            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
34453            PARAM_EXT_VALUE_DATA::ID => {
34454                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
34455            }
34456            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
34457            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
34458                PARAM_REQUEST_LIST_DATA::random(rng),
34459            )),
34460            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
34461                PARAM_REQUEST_READ_DATA::random(rng),
34462            )),
34463            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
34464            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
34465            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
34466            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
34467            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
34468            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
34469                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34470            )),
34471            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
34472                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34473            )),
34474            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
34475            PROTOCOL_VERSION_DATA::ID => {
34476                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
34477            }
34478            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
34479            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
34480            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
34481            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
34482            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
34483            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
34484                RC_CHANNELS_OVERRIDE_DATA::random(rng),
34485            )),
34486            RC_CHANNELS_RAW_DATA::ID => {
34487                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
34488            }
34489            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
34490                RC_CHANNELS_SCALED_DATA::random(rng),
34491            )),
34492            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34493                REQUEST_DATA_STREAM_DATA::random(rng),
34494            )),
34495            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
34496            RESOURCE_REQUEST_DATA::ID => {
34497                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
34498            }
34499            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34500                RESPONSE_EVENT_ERROR_DATA::random(rng),
34501            )),
34502            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34503                SAFETY_ALLOWED_AREA_DATA::random(rng),
34504            )),
34505            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34506                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
34507            )),
34508            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
34509            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
34510            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
34511            SCALED_PRESSURE_DATA::ID => {
34512                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
34513            }
34514            SCALED_PRESSURE2_DATA::ID => {
34515                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
34516            }
34517            SCALED_PRESSURE3_DATA::ID => {
34518                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
34519            }
34520            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
34521            SERVO_OUTPUT_RAW_DATA::ID => {
34522                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
34523            }
34524            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
34525            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34526                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34527            )),
34528            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34529                SET_ATTITUDE_TARGET_DATA::random(rng),
34530            )),
34531            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34532                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
34533            )),
34534            SET_HOME_POSITION_DATA::ID => {
34535                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
34536            }
34537            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
34538            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34539                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34540            )),
34541            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34542                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34543            )),
34544            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
34545            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
34546                SMART_BATTERY_INFO_DATA::random(rng),
34547            )),
34548            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
34549            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34550                STORAGE_INFORMATION_DATA::random(rng),
34551            )),
34552            SUPPORTED_TUNES_DATA::ID => {
34553                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
34554            }
34555            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
34556            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
34557            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
34558            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
34559            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
34560            TERRAIN_REQUEST_DATA::ID => {
34561                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34562            }
34563            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34564            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34565                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34566            )),
34567            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34568                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34569                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
34570                ))
34571            }
34572            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34573                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34574                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
34575                ))
34576            }
34577            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
34578            UAVCAN_NODE_INFO_DATA::ID => {
34579                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
34580            }
34581            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34582                UAVCAN_NODE_STATUS_DATA::random(rng),
34583            )),
34584            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34585                UTM_GLOBAL_POSITION_DATA::random(rng),
34586            )),
34587            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
34588            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
34589            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
34590            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34591                VICON_POSITION_ESTIMATE_DATA::random(rng),
34592            )),
34593            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34594                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34595            )),
34596            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34597                VIDEO_STREAM_STATUS_DATA::random(rng),
34598            )),
34599            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34600                VISION_POSITION_ESTIMATE_DATA::random(rng),
34601            )),
34602            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34603                VISION_SPEED_ESTIMATE_DATA::random(rng),
34604            )),
34605            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
34606            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
34607            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34608            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34609            _ => None,
34610        }
34611    }
34612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34613        match self {
34614            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34615            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34616            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34617            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34618            Self::ALTITUDE(body) => body.ser(version, bytes),
34619            Self::ARRAY_TEST_0(body) => body.ser(version, bytes),
34620            Self::ARRAY_TEST_1(body) => body.ser(version, bytes),
34621            Self::ARRAY_TEST_3(body) => body.ser(version, bytes),
34622            Self::ARRAY_TEST_4(body) => body.ser(version, bytes),
34623            Self::ARRAY_TEST_5(body) => body.ser(version, bytes),
34624            Self::ARRAY_TEST_6(body) => body.ser(version, bytes),
34625            Self::ARRAY_TEST_7(body) => body.ser(version, bytes),
34626            Self::ARRAY_TEST_8(body) => body.ser(version, bytes),
34627            Self::ATTITUDE(body) => body.ser(version, bytes),
34628            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34629            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34630            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34631            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34632            Self::AUTH_KEY(body) => body.ser(version, bytes),
34633            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34634            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34635            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34636            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34637            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34638            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34639            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34640            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34641            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34642            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34643            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34644            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34645            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34646            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34647            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34648            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34649            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34650            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34651            Self::CAN_FRAME(body) => body.ser(version, bytes),
34652            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34653            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34654            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34655            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34656            Self::COLLISION(body) => body.ser(version, bytes),
34657            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34658            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34659            Self::COMMAND_INT(body) => body.ser(version, bytes),
34660            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34661            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34662            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34663            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34664            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34665            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34666            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34667            Self::DATA_STREAM(body) => body.ser(version, bytes),
34668            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34669            Self::DEBUG(body) => body.ser(version, bytes),
34670            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34671            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34672            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34673            Self::EFI_STATUS(body) => body.ser(version, bytes),
34674            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34675            Self::ESC_INFO(body) => body.ser(version, bytes),
34676            Self::ESC_STATUS(body) => body.ser(version, bytes),
34677            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34678            Self::EVENT(body) => body.ser(version, bytes),
34679            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34680            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34681            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34682            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34683            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34684            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34685            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34686            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34687            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34688            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34689            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34690            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34691            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34692            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34693            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34694            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34695            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34696            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34697            Self::GPS2_RAW(body) => body.ser(version, bytes),
34698            Self::GPS2_RTK(body) => body.ser(version, bytes),
34699            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34700            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34701            Self::GPS_INPUT(body) => body.ser(version, bytes),
34702            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34703            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34704            Self::GPS_RTK(body) => body.ser(version, bytes),
34705            Self::GPS_STATUS(body) => body.ser(version, bytes),
34706            Self::HEARTBEAT(body) => body.ser(version, bytes),
34707            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34708            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34709            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34710            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34711            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34712            Self::HIL_GPS(body) => body.ser(version, bytes),
34713            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34714            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34715            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34716            Self::HIL_STATE(body) => body.ser(version, bytes),
34717            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34718            Self::HOME_POSITION(body) => body.ser(version, bytes),
34719            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34720            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34721            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34722            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34723            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34724            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34725            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34726            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34727            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34728            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34729            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34730            Self::LOG_DATA(body) => body.ser(version, bytes),
34731            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34732            Self::LOG_ERASE(body) => body.ser(version, bytes),
34733            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34734            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34735            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34736            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34737            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34738            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34739            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34740            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34741            Self::MISSION_ACK(body) => body.ser(version, bytes),
34742            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34743            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34744            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34745            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34746            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34747            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34748            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34749            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34750            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34751            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34752            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34753            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34754            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34755            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34756            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34757            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34758            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34759            Self::ODOMETRY(body) => body.ser(version, bytes),
34760            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34761            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34762            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34763            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34764            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34765            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34766            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34767            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34768            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34769            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34770            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34771            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34772            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34773            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34774            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34775            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34776            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34777            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34778            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34779            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34780            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34781            Self::PARAM_SET(body) => body.ser(version, bytes),
34782            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34783            Self::PING(body) => body.ser(version, bytes),
34784            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34785            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34786            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34787            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34788            Self::POWER_STATUS(body) => body.ser(version, bytes),
34789            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34790            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34791            Self::RAW_IMU(body) => body.ser(version, bytes),
34792            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34793            Self::RAW_RPM(body) => body.ser(version, bytes),
34794            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34795            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34796            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34797            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34798            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34799            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34800            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34801            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34802            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34803            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34804            Self::SCALED_IMU(body) => body.ser(version, bytes),
34805            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34806            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34807            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34808            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34809            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34810            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34811            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34812            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34813            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34814            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34815            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34816            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34817            Self::SET_MODE(body) => body.ser(version, bytes),
34818            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34819            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34820            Self::SIM_STATE(body) => body.ser(version, bytes),
34821            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34822            Self::STATUSTEXT(body) => body.ser(version, bytes),
34823            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34824            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34825            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34826            Self::SYS_STATUS(body) => body.ser(version, bytes),
34827            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34828            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34829            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34830            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34831            Self::TIMESYNC(body) => body.ser(version, bytes),
34832            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34833            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34834            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34835            Self::TUNNEL(body) => body.ser(version, bytes),
34836            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34837            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34838            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34839            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34840            Self::VFR_HUD(body) => body.ser(version, bytes),
34841            Self::VIBRATION(body) => body.ser(version, bytes),
34842            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34843            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34844            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34845            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34846            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34847            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34848            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34849            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34850            Self::WIND_COV(body) => body.ser(version, bytes),
34851        }
34852    }
34853    fn extra_crc(id: u32) -> u8 {
34854        match id {
34855            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34856            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34857            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34858            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34859            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34860            ARRAY_TEST_0_DATA::ID => ARRAY_TEST_0_DATA::EXTRA_CRC,
34861            ARRAY_TEST_1_DATA::ID => ARRAY_TEST_1_DATA::EXTRA_CRC,
34862            ARRAY_TEST_3_DATA::ID => ARRAY_TEST_3_DATA::EXTRA_CRC,
34863            ARRAY_TEST_4_DATA::ID => ARRAY_TEST_4_DATA::EXTRA_CRC,
34864            ARRAY_TEST_5_DATA::ID => ARRAY_TEST_5_DATA::EXTRA_CRC,
34865            ARRAY_TEST_6_DATA::ID => ARRAY_TEST_6_DATA::EXTRA_CRC,
34866            ARRAY_TEST_7_DATA::ID => ARRAY_TEST_7_DATA::EXTRA_CRC,
34867            ARRAY_TEST_8_DATA::ID => ARRAY_TEST_8_DATA::EXTRA_CRC,
34868            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34869            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34870            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34871            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34872            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34873            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34874            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34875                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34876            }
34877            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34878            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34879            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34880            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34881            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34882            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34883            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34884            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34885            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34886            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34887            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34888            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34889            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34890            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34891            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34892            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34893            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34894            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34895            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34896            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34897            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34898            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34899            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34900            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34901            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34902            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34903            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34904            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34905            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34906            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34907            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34908            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34909            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34910            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34911            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34912            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34913            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34914            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34915            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34916            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34917            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34918            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34919            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34920            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34921            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34922            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34923            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34924            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34925            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34926            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34927            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34928            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34929            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34930            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34931            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34932            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34933            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34934            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34935                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34936            }
34937            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34938            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34939            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34940            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34941            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34942                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34943            }
34944            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34945            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34946            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34947            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34948            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34949            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34950            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34951            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34952            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34953            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34954            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34955            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34956            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34957            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34958            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34959            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34960            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34961            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34962            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34963            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34964            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34965            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34966            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34967            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34968            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34969            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34970            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34971            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34972            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34973            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34974                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34975            }
34976            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34977            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34978            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34979            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34980            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34981            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34982            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34983            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34984            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34985            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34986            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34987            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34988            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34989            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34990            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34991            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34992            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34993            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34994            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34995            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34996            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34997            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34998            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34999            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
35000            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
35001            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
35002            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
35003            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
35004            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
35005            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
35006            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
35007            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
35008            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
35009            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
35010            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
35011            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
35012            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
35013            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
35014            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
35015            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
35016            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
35017            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
35018            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
35019            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
35020            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
35021            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
35022            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
35023            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
35024            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
35025            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
35026            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
35027            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
35028            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
35029            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
35030            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
35031            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
35032            PING_DATA::ID => PING_DATA::EXTRA_CRC,
35033            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
35034            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
35035            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
35036            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35037            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
35038            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
35039            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
35040            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
35041            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
35042            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
35043            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
35044            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
35045            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
35046            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
35047            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
35048            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
35049            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
35050            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
35051            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
35052            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
35053            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
35054            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
35055            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
35056            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
35057            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
35058            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
35059            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
35060            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
35061            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
35062            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
35063            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
35064            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
35065            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
35066            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
35067            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35068                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
35069            }
35070            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
35071            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
35072            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
35073            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
35074            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
35075            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
35076            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
35077            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
35078            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
35079            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
35080            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
35081            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
35082            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
35083            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
35084            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35085                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
35086            }
35087            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35088                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
35089            }
35090            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
35091            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
35092            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
35093            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
35094            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
35095            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
35096            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
35097            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35098            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
35099            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
35100            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
35101            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
35102            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
35103            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
35104            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
35105            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
35106            _ => 0,
35107        }
35108    }
35109    fn target_system_id(&self) -> Option<u8> {
35110        match self {
35111            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
35112            Self::CANFD_FRAME(inner) => Some(inner.target_system),
35113            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
35114            Self::CAN_FRAME(inner) => Some(inner.target_system),
35115            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
35116            Self::COMMAND_ACK(inner) => Some(inner.target_system),
35117            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
35118            Self::COMMAND_INT(inner) => Some(inner.target_system),
35119            Self::COMMAND_LONG(inner) => Some(inner.target_system),
35120            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
35121            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
35122            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
35123            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
35124            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
35125            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
35126            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
35127            Self::LOGGING_ACK(inner) => Some(inner.target_system),
35128            Self::LOGGING_DATA(inner) => Some(inner.target_system),
35129            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
35130            Self::LOG_ERASE(inner) => Some(inner.target_system),
35131            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
35132            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
35133            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
35134            Self::MISSION_ACK(inner) => Some(inner.target_system),
35135            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
35136            Self::MISSION_COUNT(inner) => Some(inner.target_system),
35137            Self::MISSION_ITEM(inner) => Some(inner.target_system),
35138            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
35139            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
35140            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
35141            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
35142            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
35143            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
35144            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
35145            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
35146            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
35147            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
35148            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
35149            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
35150            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
35151            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
35152            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
35153            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
35154            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
35155            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
35156            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
35157            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
35158            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
35159            Self::PARAM_SET(inner) => Some(inner.target_system),
35160            Self::PING(inner) => Some(inner.target_system),
35161            Self::PLAY_TUNE(inner) => Some(inner.target_system),
35162            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
35163            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
35164            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
35165            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
35166            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
35167            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
35168            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
35169            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
35170            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
35171            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
35172            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
35173            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
35174            Self::SET_MODE(inner) => Some(inner.target_system),
35175            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
35176            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
35177            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
35178            Self::TIMESYNC(inner) => Some(inner.target_system),
35179            Self::TUNNEL(inner) => Some(inner.target_system),
35180            Self::V2_EXTENSION(inner) => Some(inner.target_system),
35181            _ => None,
35182        }
35183    }
35184    fn target_component_id(&self) -> Option<u8> {
35185        match self {
35186            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
35187            Self::CANFD_FRAME(inner) => Some(inner.target_component),
35188            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
35189            Self::CAN_FRAME(inner) => Some(inner.target_component),
35190            Self::COMMAND_ACK(inner) => Some(inner.target_component),
35191            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
35192            Self::COMMAND_INT(inner) => Some(inner.target_component),
35193            Self::COMMAND_LONG(inner) => Some(inner.target_component),
35194            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
35195            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
35196            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
35197            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
35198            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
35199            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
35200            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
35201            Self::LOGGING_ACK(inner) => Some(inner.target_component),
35202            Self::LOGGING_DATA(inner) => Some(inner.target_component),
35203            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
35204            Self::LOG_ERASE(inner) => Some(inner.target_component),
35205            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
35206            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
35207            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
35208            Self::MISSION_ACK(inner) => Some(inner.target_component),
35209            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
35210            Self::MISSION_COUNT(inner) => Some(inner.target_component),
35211            Self::MISSION_ITEM(inner) => Some(inner.target_component),
35212            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
35213            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
35214            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
35215            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
35216            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
35217            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
35218            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
35219            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
35220            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
35221            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
35222            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
35223            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
35224            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
35225            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
35226            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
35227            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
35228            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
35229            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
35230            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
35231            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
35232            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
35233            Self::PARAM_SET(inner) => Some(inner.target_component),
35234            Self::PING(inner) => Some(inner.target_component),
35235            Self::PLAY_TUNE(inner) => Some(inner.target_component),
35236            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
35237            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
35238            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
35239            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
35240            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
35241            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
35242            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
35243            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
35244            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
35245            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
35246            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
35247            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
35248            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
35249            Self::TIMESYNC(inner) => Some(inner.target_component),
35250            Self::TUNNEL(inner) => Some(inner.target_component),
35251            Self::V2_EXTENSION(inner) => Some(inner.target_component),
35252            _ => None,
35253        }
35254    }
35255}